using old timeout_socket with UDP
Bill Seitz
fluxent at yahoo.com
Fri Oct 29 17:43:06 EDT 2004
I need to send some messages with UDP, using a version of Python
pre-2.3, but with some control over timeout period.
I've been pointed at
http://www.python.or.kr/pykug/timeoutsocket
I tweaked its line 142 to import SOCK_DGRAM
from socket import AF_INET, SOCK_STREAM, SOCK_DGRAM
Then my main function calls
timeoutsocket.setDefaultSocketTimeout(5)
and later
uSock = timeoutsocket.timeoutsocket(timeoutsocket.AF_INET,timeoutsocket.SOCK_DGRAM)
Does that make sense?
More information about the Python-list
mailing list