develooper Front page | perl.beginners | Postings from January 2002

RE: Computer connected to the internet?

Thread Previous | Thread Next
From:
Peter Scott
Date:
January 4, 2002 08:47
Subject:
RE: Computer connected to the internet?
Message ID:
4.3.2.7.2.20020104084635.00a81260@mail.webquarry.com
At 12:24 PM 1/4/2002 +0000, John Edwards wrote:
>How about pinging several hosts that have a pretty good chance of being up.
>www.microsoft.com, www.netscape.com, www.ibm.com, etc, etc. You could also
>ping your local gateway address.
>John
>
>-----Original Message-----
>From: Gary Hawkins [mailto:ghawk@eskimo.com]
>
>How can I check whether the system is connected?
>
>Want to pause the script if connection is lost.

Frequently, people ask the wrong question in this situation and make life 
unnecessarily complicated,

Instead of trying to check whether "there is an Internet connection," just 
see whether you can do whatever it is your program is using the Internet 
for.  After all, what good will it do you to reach ibm.com if the route to 
the place you're really connecting to goes down?  Besides, places like 
ibm.com often set up firewalls that keep pings out.

Peter Scott
peter@psdt.com
http://www.perldebugged.com


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About