Lightwight socket IO wrapper

Gregory Ewing greg.ewing at canterbury.ac.nz
Tue Sep 22 20:47:25 EDT 2015


Random832 wrote:

> Isn't this technically the same problem as pressing ctrl-d at a terminal
> - it's not _really_ the end of the input (you can continue reading
> after), but it sends the program something it will interpret as such?

Yes. There's no concept of "closing the connection" with UDP,
because there's no connection. So if a read returns 0 bytes,
it must be because someone sent you a 0-length datagram.

-- 
Greg



More information about the Python-list mailing list