Timeout on a UDP Socket

Skip Montanaro skip at pobox.com
Sun Mar 21 09:48:19 EST 2004


    w> I'm having problems with this program hanging on the revc(buf).  I
    w> was trying to figure out a way to allow the socket to timeout.  

Since 2.3 you can set socket timeouts.  It ought to work for UDP sockets
though I've never tried it with anything other than TCP sockets.  Check the
socket module libref page.

Skip




More information about the Python-list mailing list