.. .. $SIG{ALM} = \&timed_out; eval { alarm(5) #socket code here }; if ($@=~/dead/) { #time out handling here } alarm(0); .. .. sub timed_out{ die "dead"; }
From there you can do whatever handling you like (and should prolly change the 5 to something like $timeoutValue)
In reply to Re: Timing Socket Output
by Ryszard
in thread Timing Socket Output
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |