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:user@domain.invalid
Date:Thu, 20 Sep 2007 13:42:12

Remy Lebeau (TeamB) wrote:
> <user@domain.invalid> wrote in message
> news:46f169ed$1@newsgroups.borland.com...
>
> The only way to detect abnormal disconnects is to either way for the OS ti
> time out internally (which can take up to several hours), or else implement
> your own keep-alive system in your packets.  Given the nature of your
> current protocol, that is not going to be easy to implement, either.  So you
> are left with only 1 option - set the ReadTimeout on the client, and don;t
> allow the server to go idle for periods of time that are longer than that
> timeout (or at least have it send a 0-length string periodically - that
> could act as your keep-alive).
>

I am now using the ReadTimeout on the client.

I am also sending a 0 length string if the socket is idle.  On the
server side, how do I catch (in order to reset my timeout) the 0 length
string?  (FWIW, I am using command handlers)


Thanks.

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive