[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[Libevent-users] What is the best way to detect a client socket disconnect?



Within libevent, of course.  As a point of reference, let's say we
start up the TCP Echo server that is in Nick's book here:
http://www.wangafu.net/~nickm/libevent-book/Ref8_listener.html

I could handle a normal client shutdown by sending a special shutdown
sequence from client to server, but what about connection lost?  What
is the best way for the server to detect this state?  Can I do it
without pinging the client?

Thanks in advance.

- Ken
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.