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

RE: Computer connected to the internet?

Thread Previous | Thread Next
Peter Scott
January 4, 2002 08:47
RE: Computer connected to the internet?
Message ID:
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.
>,,, etc, etc. You could also
>ping your local gateway address.
>-----Original Message-----
>From: Gary Hawkins []
>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 if the route to 
the place you're really connecting to goes down?  Besides, places like often set up firewalls that keep pings out.

Peter Scott

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About