Michael D. Smith wrote:
> Is there a right way/best way to check for an internet connection?

A strategy I use:

Have a list of IPs to check, as high-availability as possible. Set a
relatively low timeout for LWP. Loop through the IPs, checking each, and
repeating the loop at least once. If you don't get a connection after that,
you can be pretty certain there's something down between you and your
destination.

Oh, and use HEAD instead of GET, as it results in smaller, quicker
responses.

This gives you a more thorough check and often takes no longer than a single
fetch via LWP with the default timeout.

- Mark. 


_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to