Re: How to deal with event timeout?
Jeremy Leader <[email protected]> Mon, 22 Mar 2010 13:56:03 -0700
| Newsgroups | gmane.comp.lang.perl.poe |
|---|---|
| Message-ID | <[email protected]> |
Can't you just use a name-based timer, re-set it every time you get any activity, and when it goes off (implying no activity for the duration of the timer), shut down? http://search.cpan.org/~rcaputo/POE-1.287/lib/POE/Kernel.pm#delay_set_EVENT_NAME,_DURATION_SECONDS_[,_PARAMETER_LIST] -- Jeremy Leader [email protected] [email protected] Ryan Chan wrote: > For example, I am using POE::Component::Client::NNTP > > http://search.cpan.org/~bingos/POE-Component-Client-NNTP-2.14/lib/POE/Component/Client/NNTP.pm > > This module does not specify any timeout, so sometimes my program > seems hanged and does not response. > > Is it possible to specify a timeout or lifetime for the event, so it > will quit when reached the specified time?