While looking for ICE/STUN libraries for a peer-to-peer Java application, I ran into a problem. I needed to be able to ensure reliable delivery. All Java ICE libraries that I could find offered UDP hole punching (via the STUN protocol), but not TCP hole punching. I want peers to be able to reliably send files to one another over a network without needing a server, but UDP is not reliable. How do I get reliable, cross platform, peer-to-peer data delivery?
I have done a little research and have found this solution, know as "pseudo-TCP" - for example: http://nice.freedesktop.org/libnice/libnice-Pseudo-TCP-Socket.html
Pseudo-TCP is reliable and also available in Java,
See:
https://github.com/opentelecoms-org/ice4j/blob/master/test/test/IcePseudoTcp.java
(^ from the ICE4J library^)
And also:
https://code.google.com/p/ice4j/source/browse/trunk/src/org/ice4j/pseudotcp/PseudoTcpSocket.java?r=335
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With