eval {
local $SIG{'ALRM'} = sub { die "Timed out" };
alarm($timeout);
while(<$conn>) {
....
alarm($timeout);
}
alarm(0);
};
if ($@ =~ /Timed out/) {
print STDOUT "Timed Out.\r\n";
}
In reply to Re^3: socket time out
by Anonymous Monk
in thread socket time out
by xarex
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |