C++ – A Reliable UDP Implementation

cnetwork-protocolsudp

I need an implementation of UDP that meets the following criteria:

  • Available on Linux and Mac (only latest versions matter)
  • Usable from C++
  • Orders packets
  • Guaranties packet delivery
  • Non conection oriented (like UDP)

NOTE: I do NOT want to use TCP for this.
NOTE: It can be implemented by any socket API, as long as it is available on the two platforms and is available to C++.

EDIT:
I have looked at the UDT, RUDP, and SCTP. These seem to be the major contenders. Any thoughts?

EDIT:
UDT seems to be what I am looking for. Is the fact that it is implemented in user-space over the kernels UDP going to be a huge performance problem? Or will the speeds still be faster than TCP/STCP?

EDIT (2/15/12):
I have came up with a solution that uses TCP and a central redirection server. The system lets one client send data to the server through an ever-open TCP connection, who them gives it along to the right other client along the server's TCP connection to the second.

Best Answer

This is an old question, but I saw that nobody answered anything about UDT. I have some experience with it, so I can share them.

UDT works pretty good. You basically use it like you would an UDP socket, and get all the thing that you listed from it.

Performance-wise, I haven't noticed any problems. Actually, it has several algorithms to maximise throughput, and you can get quite amazing results (I got >90 MB/s on a 100 MB/s Ethernet LAN). It works fine over slow / high latency links, too.

It's not perfect, of course, and some errors scenarios are not handled the way I'd like, but, for the most part, you just "plug it in" and you're good.

Related Topic