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



Well, I do not see any reason why you need to re-implement the wheel, jsut
use standard built-in functionality.

--
V.
This posting is provided "AS IS" with no warranties, and confers no
rights.
<eselk2003@xxxxxxxxx> wrote in message
news:aaa5c7b7-e0d2-4b39-af64-a4ad827afc5d@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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).


.