non-blocking sockets
so very tired
g0riaman at cdf.toronto.edu
Tue Apr 23 11:00:42 EDT 2002
When trying to read from a socket, I don't want it hanging, so I set it to
non-blocking by calling
setblocking(0)
but then when I try to read from it and there is no data in the socket, I
get an error. I tried this in both windows and linux and in both I get an
error and the program stops. It says there's an exception but it doesn't
say the name of the exception so I can't even try to catch.
Does anyone know how I can check if there's data coming from a socket
connection without hanging or having the program barf on me?
Thanks.
mRiaz
More information about the Python-list
mailing list