I agree the TCP keepalive on the server might be more elegant, but this is easier.
I have never used keepalive, but from what I read in the Stevens book, it sounds as though I can use it in my client without the server needing to use it too. After enough idle time my TCP stack will send "a TCP segment to which the [server] must respond" with an ACK or RST.
It would also be nice for the server to use keepalive so it can detect if a client crashes or loses connectivity, which is after all much more likely, but I think I can unilaterally use keepalive in my client. Is anyone planning to add it to the server? Seems like it would only take a few lines of code for Someone Versed In The Art of BSD sockets...
�Jens
