[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] detection of TCP disconnection



On Tue, Nov 22, 2011 at 7:18 PM,  <Ivan.Novick@xxxxxxx> wrote:
> However if i a do hard reset(power off) of the machine running the client,
> it does not seem to work and I believe I am not getting a callback
> function for the event on the server.
I think the fundamental problem is distinguishing between 'hard reset'
and 'network temporarily down'. In both cases, the clients sees it as
silence from the server for some (arbitrarily long) period of time.

Most apps just send application-level pings at some interval and
handle unanswered pings in some manner that is appropriate to the
application.
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.