Re: Able to detect disconnect, except one weird case...



On May 5, 8:46 am, "Volodymyr M. Shcherbyna"
<v_scherb...@xxxxxxxxxxxxxxx> wrote:
Just a hint, enable SO_KEEPALIVE option on a socket
(http://msdn.microsoft.com/en-us/library/ms740476.aspx) and see if it helps.


I imagine it would, although I would need to change the default times
(using SIO_KEEPALIVE_VALS) to a much smaller value (the one that
defaults to 2 hours)... since I'm seeing this happen after less than
30 minutes (could be as little as 5 minutes).

I guess just the fact that so many people are using this option tells
me that keep-alives are indeed needed, and no way around them... so
I'll go ahead and create my own keep-alives, since this is easy to add
to my design (and I don't like using functions where the help file
points to a standards commitee if I can avoid it easily).
.