sockets: client dies...
Donn Cave
donn at u.washington.edu
Tue Jan 23 16:18:45 EST 2001
More information about the Python-list mailing list
Tue Jan 23 16:18:45 EST 2001
- Previous message (by thread): sockets: client dies...
- Next message (by thread): sockets: client dies...
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Quoth Keith Murphy <kpmurphy at my-deja.com>: | what can you do when the client dies in a client/server socket | relationship? currently, my problem is that the server doesn't know | when a client has terminated unexpectedly. is there any way to do so? Ideally, that will close the socket. If that happens, then the socket becomes "readable" - that is, a recv() will return immediately without blocking, returning '' (empty string.) (I'm assuming the socket is blocking, per default.) I don't know any way to tell the difference between "closed" and "has data", prior to calling recv(). But you can tell the difference between readable and "would block" prior to recv(), with select(). If the client dies and the socket doesn't close, then it may be worth while to figure out why it doesn't. Donn Cave, donn at u.washington.edu
- Previous message (by thread): sockets: client dies...
- Next message (by thread): sockets: client dies...
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list