UDP server socket

Peter L Hansen peter at engcorp.com
Thu Oct 14 15:03:34 CEST 2004

Ajay wrote:
> whats the maximum number of datagrams that can queue up on a UDP server
> socket? or is that system dependent?
> i have some code that iteratively handles datagrams, and while testing it,
> i noticed that it responds to at most 3 datagrams (i tried sending 4, 6, 8
> and 10 datagrams / second)
> is that a system dependent feature or can i change that (i didn't see
> anything in the manual)

I don't believe (though I'm not an expert in UDP) that you can
"queue up" UDP packets at all.  At least, there are explicitly
NO guarantees as to whether any given packet will even make it
through the network, and I doubt any system provides explicit
guarantees as to how many UDP packets can be handled if there
is a backlog.  If you are looking for reliable communications,
that's what TCP is for... otherwise you have to handle missed
or duplicated packets yourself.


More information about the Python-list mailing list