Chris Angelico rosuav at
Wed Jan 30 23:34:58 CET 2013

On Thu, Jan 31, 2013 at 6:55 AM, Jorge Alberto Diaz Orozco
<jaorozco at> wrote:
> I want to use a reliable UDP connection like you say, a TCP like connection but over UDP. thaks for your recomendation, if I get good results I promise to share them.

To get something reliable over UDP, you're going to need to
acknowledge everything you're sent, and if you don't hear back an
acknowledgement, re-send. Basically reimplement TCP, or parts of it.
Why do you need to use UDP?

I've used UDP for a number of purposes, but usually in a "fire and
forget" system. For instance, my latest use of it was a peer-to-peer
self-healing network; each node would broadcast a periodic UDP packet
saying "Hi, I'm here, and here's my current status", and each node
would keep track of the timestamp when it last received such a packet
from each known IP address. If the time-since-last-received exceeds
three broadcast intervals, the node is considered to be dead. But for
this to work, I have to not care about individual packet loss; there
is no data in the packet that won't be repeated in the next one. This
is a reliable *system* built on UDP.

Can you explain your goals and restrictions? Might help us figure out
how to advise.


More information about the Python-list mailing list