in reply to socket time out
you could try using alarm in an eval block (untested):
Ohaeval { local $SIG{'ALRM'} = sub { die "Timed out" }; alarm($timeout); while(<$conn>) { .... alarm($timeout); } alarm(0); } if ($@ =~ /Timed out/) { print STDOUT "Timed Out.\r\n"; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: socket time out
by xarex (Initiate) on Nov 09, 2007 at 16:08 UTC | |
by Anonymous Monk on Jan 04, 2008 at 11:24 UTC |
In Section
Seekers of Perl Wisdom