user4691169
user4691169

Reputation:

How do I send large files over hole punched (STUN) UDP without packet loss?

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?

Upvotes: 3

Views: 961

Answers (1)

user4691169
user4691169

Reputation:

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

Upvotes: 2

Related Questions