Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Suppose there is UDP connection that does not expect much packet loss.

Are there already tools that allow wrapping a UDP connection to gain more reliability at expence of bandwidth and overhead, for example, using Reed-Solomon codes.

Expected usage:

host1$ someprogram --listen-udp 127.0.0.1:1234
host1$ reedsolomon_udp --listen 0.0.0.0:1235 --connect 127.0.0.1:1234

host2$ reedsolomon_udp --connect host1:1235 --listen 127.0.0.1:1234
host2$ someprogram --connect-udp 127.0.0.1:1234

The solution is not expected to remove losses outright, it expected to reduce them, especially if more than 50% packets are getting lost.

share|improve this question
add comment

1 Answer

If the program expects reliable connections, then it needs to use TCP, not UDP. UDP is unprotected against loss at the protocol level - it's a best-effort delivery system only. TCP is a guaranteed-delivery system.

share|improve this answer
    
UDP program can expect some loss, for example, about 2%. And actual loss can be, for example, 70%. I need to "hammer thought" very unreliable network. The progam in question is not expected to remove the losses, it expected to lessen the number of them. –  Vi. Feb 21 '13 at 14:36
    
Actually there is going to be TCP inside the UDP tunnel. But TCP works bad when many packets are getting lost. I'm considering implementing "reedsolomon_udp" myself, but first asking here because of maybe someone somewhere for something already implemented such thing. –  Vi. Feb 21 '13 at 14:37
    
TCP inside a UDP tunnel? You're asking for problems. If you need to reduce packet loss, you need to clean up the dirty network. Wrapping a TCP connection inside a UDP "tunnel" (there really is no such thing), and then trying to re-wrap it to reduce packet loss, will very rapidly get you to an infinite-wait state due to the exponential back-off properties of the TCP session. –  John Feb 21 '13 at 14:39
    
I want this as a solution to "clean up dirty network" that I can't control (as workaround). And what's wrong with "TCP inside UDP tunnel"? It's not TCP inside TCP. For example, Teredo uses this and doesn't seem to trouble... –  Vi. Feb 21 '13 at 14:42
    
What you want doesn't exist. TCP inside UDP is bad. Teredo is for IPv6-inside-IPv4, which is at a different layer of the protocol stack, so it doesn't really apply. You're stuck. Clean up the network, or have it cleaned up, or deal with the packet loss. Those are your only practical choices. –  John Feb 21 '13 at 14:45
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.