socket.rcv timeout while-loop
Stephen Hansen
me+list/python at ixokai.io
Thu Feb 3 13:04:08 EST 2011
More information about the Python-list mailing list
Thu Feb 3 13:04:08 EST 2011
- Previous message (by thread): socket.rcv timeout while-loop
- Next message (by thread): socket.rcv timeout while-loop
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 2/3/11 9:56 AM, Dwayne Blind wrote: > However I would like to set timeout on the socket rcv method, so that > the while loop stops exactly after 3 seconds. Is this possible ? I rarely do low-level socket stuff -- but I think s.settimeout() is what you're looking for. It applies to the whole socket, and not just one method -- so you may want to reset it after you're done recv'n. -- Stephen Hansen ... Also: Ixokai ... Mail: me+list/python (AT) ixokai (DOT) io ... Blog: http://meh.ixokai.io/ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 487 bytes Desc: OpenPGP digital signature URL: <http://mail.python.org/pipermail/python-list/attachments/20110203/bc6f0566/attachment-0001.sig>
- Previous message (by thread): socket.rcv timeout while-loop
- Next message (by thread): socket.rcv timeout while-loop
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list