socket.rcv timeout while-loop
Dwayne Blind
dwayneblind at gmail.com
Thu Feb 3 12:56:21 EST 2011
Hi everybody,
I am using Python 3.0.
I have such a code :
b=time.clock()
while time.clock()-b<3 :
data=s.recv(1024)
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 ?
Thanks a lot,
Dwayne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110203/375b5cdb/attachment.html>
More information about the Python-list
mailing list