InfiniteLoop has asked for the wisdom of the Perl Monks concerning the following question:
use Sys::AlarmCall; #open socket #.... &socket_read(); sub alarm_signal { print STDERR "Received alarm\n"; &socket_read(); }; sub socket_read { while(1){ alarm_call(60, 'alarm_signal'); my $len = $socket->sysread($line,1024); #..... } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: blocking socket and alarm
by ikegami (Patriarch) on Sep 05, 2006 at 14:59 UTC | |
|
Re: blocking socket and alarm
by ozone (Friar) on Sep 05, 2006 at 16:59 UTC | |
by ikegami (Patriarch) on Sep 05, 2006 at 17:07 UTC | |
|
Re: blocking socket and alarm
by samtregar (Abbot) on Sep 05, 2006 at 17:02 UTC |