in reply to Timeouts when reading from socket Filehandles?
this should give you a 10 second timeout on your function call.eval { local $SIG{ALRM} = sub { die "Timed Out" }; alarm 10; ### IO::Socket/Select function call goes here alarm 0; }; if ($@ and $@ !~ /Timed Out/) { die }
--
hiseldl
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Timeouts when reading from socket Filehandles?
by sporte01 (Acolyte) on Aug 27, 2002 at 17:35 UTC |