How to stop a SocketServer?
Skip Montanaro
skip at pobox.com
Mon Jun 24 21:54:06 EDT 2002
Peter> By the way, look into "timeoutsocket.py" which is a plug-in
Peter> replacement for the standard socket.py and which might do the
Peter> trick for you.
Note socket objects grow a settimeout() method in 2.3. If you get Python
from CVS you can have it today:
settimeout(value)
Set a timeout on blocking socket operations. The value argument can be
a nonnegative float expressing seconds, or None. If a float is given,
subsequent socket operations will raise an error exception if the
timeout period value has elapsed before the operation has completed.
Setting a timeout of None disables timeouts on socket operations.
s.settimeout(0.0) is equivalent to s.blocking(0); s.settimeout(None) is
equivalent to s.setblocking(1). New in version 2.3.
--
Skip Montanaro
skip at pobox.com
consulting: http://manatee.mojam.com/~skip/resume.html
More information about the Python-list
mailing list