RE: Help with socket timeout

2009-12-10 Thread Jeff Saxton
Oops! F***ing M$ appears to not work on windoze :( -Original Message- From: activeperl-boun...@listserv.activestate.com [mailto:activeperl-boun...@listserv.activestate.com] On Behalf Of Bill Luebkert Sent: Thursday, December 10, 2009 1:25 PM To: activeperl@listserv.ActiveState.com Subject

Re: Help with socket timeout

2009-12-10 Thread Bill Luebkert
Jeff Saxton wrote: > Why not do it the simple way? > > use IO::Socket; > my $sock = IO::Socket::INET->new($somewhere); > $sock->timeout($n); Have you tried that on Windoze ? ___ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe:

RE: Help with socket timeout

2009-12-10 Thread Jeff Saxton
Why not do it the simple way? use IO::Socket; my $sock = IO::Socket::INET->new($somewhere); $sock->timeout($n); -Original Message- From: activeperl-boun...@listserv.activestate.com [mailto:activeperl-boun...@listserv.activestate.com] On Behalf Of Bill Luebkert Sent: Thursday, December

Re: Help with socket timeout

2009-12-10 Thread Bill Luebkert
Angelos Karageorgiou wrote: > > a better way to handle it would be via alarm(ed) timeouts like this > > eval { > local $SIG{ALRM} = sub { die "alarm\n" }; # NB \n required > alarm $timeout; > > A lot of socket work done here > > alarm 0; > }; > die if $@ && $@ ne "alarm\n

Re: Help with socket timeout

2009-12-10 Thread Angelos Karageorgiou
Ken Cornetet wrote: Ping it first with Net::Ping -Original Message- From: activeperl-boun...@listserv.activestate.com [mailto:activeperl-boun...@listserv.activestate.com] On Behalf Of Barry Brevik Sent: Tuesday, December 08, 2009 7:44 PM To: activeperl@listserv.ActiveState.com Subject: