Python sockets/select

David Allen s2mdalle at titan.vcu.edu
Tue Jun 20 21:41:03 EDT 2000


I've been programming with sockets in python recently, and it's all
been going well and it's relatively easy with a few exceptions....

When I select() sockets for reading, writing, and error conditions,
there are sockets (usually connected to clients who have already
quit or died unexpectedly) that don't show up in the error queue,
but continually flag select() as being readable.  When I read them,
of course, '' comes back.

For some reason, sometimes '' comes in for valid clients, so I 
can't just disconnect a client because I get that from them.  Is
there a way to detect which clients are alive and which aren't?
What causes a client to send '' when I didn't tell it to, according
to select()?  (The clients are also written in python)

Any help would be appreciated.
-- 
David Allen
http://opop.nols.com/




More information about the Python-list mailing list