How to detect dead peer quickly in AnyEvent::Handle?
Marc Lehmann
schmorp at schmorp.de
Mon Feb 25 22:40:43 CET 2013
On Mon, Feb 25, 2013 at 08:16:59AM -0500, Fulko Hew <fulko.hew at gmail.com> wrote:
> > I want to detect dead peers just by checking outstanding tcp ACK in
> > on_wtimeout. Is it possible and how?
Whether a peer is dead is determined by the protocol in question, in this
case, tcp. The lack of on ack within a fixed time does not indicate a dead
peer.
If you want your own nonstandard defintiion of dead peer (such as, no tcp ack
received within xxx seconds), then there is no portable way to do that. With
linux you can try the TCP_INFO socket option for example.
--
The choice of a Deliantra, the free code+content MORPG
-----==- _GNU_ http://www.deliantra.net
----==-- _ generation
---==---(_)__ __ ____ __ Marc Lehmann
--==---/ / _ \/ // /\ \/ / schmorp at schmorp.de
-=====/_/_//_/\_,_/ /_/\_\
More information about the anyevent
mailing list