I've used LWP::UserAgent on W2K Pro and Advanced Server, and the timeout seems to work fine for me.
I've also had success using alarm, but I was only testing to see if it worked, not trying it as a sanity timer (which is what a timeout would be). my $uagent = LWP::UserAgent->new; $uagent->timeout(2); my $response = $uagent->get ('http://192.168.0.1/default.html'); if (!$response->is_success) { print "uagent error: " . $response->status_line . "\n"; return; } I hope this helps! Brian Millham This message traveled at least 44,000 miles to reach you! Creator of the DW6000 Monitor http://www.millham.net/dw6000 [EMAIL PROTECTED] -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kurt G Sent: Tuesday, May 31, 2005 1:07 PM To: [EMAIL PROTECTED]; perl-win32-gui-users@lists.sourceforge.net Subject: Re: [perl-win32-gui-users] no alarm() in Win32, any work-arounds? I'm working on a simple network monitor that periodically checks HTTP service on a list of machines. I'm using LWP::UserAgent which offers a timeout setting but timeout is ignored in Win32, so attempting a connection to dead machine makes your program wait (in blocking mode, no less, seems non-blocking IO is not an option either) for up to a minute. I've tried Win32::PingICMP to test the machine for upness before attempting an HTTP connection but ICMP is blocked on some the machines being tested, and also does not help if the machine is up but HTTP server is down. Thanks, Kurt > >What where you planning on using the alarm function for? I can think of a >potential work around, but it would depend on what you were planning:) > >Cheers, > >jez. > ------------------------------------------------------- This SF.Net email is sponsored by Yahoo. Introducing Yahoo! Search Developer Network - Create apps using Yahoo! Search APIs Find out how you can build Yahoo! directly into your own Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 _______________________________________________ Perl-Win32-GUI-Users mailing list Perl-Win32-GUI-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users --- avast! Antivirus: Inbound message clean. Virus Database (VPS): 0522-4, 05/31/2005 Tested on: 5/31/2005 6:52:20 PM avast! is copyright (c) 2000-2003 ALWIL Software. http://www.avast.com --- avast! Antivirus: Outbound message clean. Virus Database (VPS): 0522-5, 05/31/2005 Tested on: 5/31/2005 11:25:34 PM avast! is copyright (c) 2000-2003 ALWIL Software. http://www.avast.com