Re: Check internet connection

Giganews Newsgroups
Subject: Re: Check internet connection
Posted by:  Remy Lebeau (Indy Team) (no.spam@no.spam.com)
Date: Fri, 10 Aug 2007

"james" <jamesb8…@yahoo.com> wrote in message
news:52D859341731E340jamesb8…@yahoo.com...

> How can I check for an internet connection

That is outside the scope of Indy.  You have to use other means to do that.
The most reliable way is to ping a known server on the Internet.

> and stop IdHTTP1Get() if none is found?

You can't stop it.  You can only avoid calling it at all if no connection is
present.  But that won't help if the connection goes down while Get() is
working.  Why not just wrap the Get() in a try..except block and handle any
error it raises instead?

Gambit

Replies

In response to

Check internet connection posted by james on Fri, 10 Aug 2007