Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Sep : Re: Indy 9 - not detecting disconnect over VPN

www.cryer.info
Managed Newsgroup Archive

Re: Indy 9 - not detecting disconnect over VPN

Subject:Re: Indy 9 - not detecting disconnect over VPN
Posted by:"Remy Lebeau (TeamB)" (no.spam@no.spam.com)
Date:Thu, 20 Sep 2007 12:55:22

<user@domain.invalid> wrote in message
news:46f2c357$1@newsgroups.borland.com...

> Sorry I muddied the water.  This same client server setup has a second
> client/server socket that is configured more traditionally.  However,
> when the VPN goes away, the server does not detect the client has
> disconnected

If the VPN is not shutting down the sockets gracefully (which it sounds like
it is not), then the server would not be able to detect a lost client until
the OS times out internally (which takes a long time).  That is why you need
to implement keep-alives in your packet traffic.  That way, the server can
close the socket on its end if no packets have arrived from the client after
an idle period of time.

> From your earlier message, I was thinking of maintaining my own timeout
> scheme whereby I would note the last traffic time and after x time elapsed
> without traffic, declare it disconnected.

That is exactly what you need to do.


Gambit

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive