Skip Menu |

This queue is for tickets about the AnyEvent-IRC CPAN distribution.

Report information
The Basics
Id: 52043
Status: resolved
Priority: 0/
Queue: AnyEvent-IRC

People
Owner: Nobody in particular
Requestors: LEEDO [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: only ping server if no traffic since last ping
It seems wasteful to pint the server if you you have received traffic since the last ping/pong. The POE IRC reconnecter keeps track a "seen traffic" flag between each ping and doesn't send the ping if the flag is set. http://poe.perl.org/?POE_Cookbook/IRC_Bot_Reconnecting I'm not sure if this should replace the current ping functionality or not. Would this be worth adding? Or is it something people should be doing themselves?
Subject: Re: [rt.cpan.org #52043] only ping server if no traffic since last ping
Date: Wed, 25 Nov 2009 13:19:00 +0100
To: Lee Aylward via RT <bug-AnyEvent-IRC [...] rt.cpan.org>
From: Robin Redeker <elmex [...] ta-sa.org>
Hi Lee! On Tue, Nov 24, 2009 at 04:30:59PM -0500, Lee Aylward via RT wrote: Show quoted text
> Tue Nov 24 16:30:58 2009: Request 52043 was acted upon. > Transaction: Ticket created by LEEDO > Queue: AnyEvent-IRC > Subject: only ping server if no traffic since last ping > Broken in: (no value) > Severity: Wishlist > Owner: Nobody > Requestors: LEEDO@cpan.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=52043 > > > > It seems wasteful to pint the server if you you have received traffic > since the last ping/pong. The POE IRC reconnecter keeps track a "seen > traffic" flag between each ping and doesn't send the ping if the flag is > set. > > http://poe.perl.org/?POE_Cookbook/IRC_Bot_Reconnecting > > I'm not sure if this should replace the current ping functionality or > not. Would this be worth adding? Or is it something people should be > doing themselves?
Usually servers PING you if you don't send stuff within a certain amount of time. The automatic client side PING is sent for two reasons: First it signals the server that we are still alive, and second it kind of acts as TCP keep-alive for platforms where that is not enabled. As server usually send you PINGs if you don't send any traffic a "seen traffic" flag would't really save that much traffic. It might still be worth adding for some special use cases. I'm open for patches :-) Greetings, Robin -- Robin Redeker | Deliantra, the free code+content MORPG elmex@ta-sa.org / r.redeker@gmail.com | http://www.deliantra.net http://www.ta-sa.org/ |
On Wed Nov 25 07:43:29 2009, ELMEX wrote: Show quoted text
> > Usually servers PING you if you don't send stuff within a certain > amount of time. The automatic client side PING is sent for two > reasons: > First it signals the server that we are still alive, and second it > kind of acts as TCP keep-alive for platforms where that is not > enabled. > > As server usually send you PINGs if you don't send any traffic a "seen > traffic" > flag would't really save that much traffic. > > It might still be worth adding for some special use cases. > I'm open for patches :-) > > > Greetings, > Robin >
I see, that makes it a bit more clear. My main use case for PINGing is to check if I have been disconnected (specifically after waking up my laptop from sleep.) I think I will implement this for my application and see how much work is involved. Thanks!