How to detect dead peer quickly in AnyEvent::Handle?

Fulko Hew fulko.hew at gmail.com
Mon Feb 25 14:16:59 CET 2013


On Mon, Feb 25, 2013 at 2:47 AM, Michael Fung <mike at 3open.org> wrote:

> Dear all,
>
> I have these in an AnyEvent::Handle:
>
> [code]
> wtimeout => KEEPALIVE_INTERVAL,
>
> on_wtimeout => sub{
>   my $hdl = shift;
>   $hdl->push_write ("KEEPALIVE" . $CRLF);
> },
>
> on_error => sub { # destroy handle... }
> [/code]
>
> This works but it takes very long to detect dead peers.
>
> I prefer not to have peer to send data as ACK to save bandwidth.
> I want to detect dead peers just by checking outstanding tcp ACK in
> on_wtimeout. Is it possible and how?
>
> Sorry if it is not related to AnyEvent.
>
>
> Thanks,
> Michael
>
> ______________________________**_________________
> anyevent mailing list
> anyevent at lists.schmorp.de
> http://lists.schmorp.de/**mailman/listinfo/anyevent<http://lists.schmorp.de/mailman/listinfo/anyevent>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.schmorp.de/pipermail/anyevent/attachments/20130225/7aa00658/attachment.html>


More information about the anyevent mailing list