Re: There Is Function That Detect If Internet Is Connected ?

Giganews Newsgroups
Subject: Re: There Is Function That Detect If Internet Is Connected ?
Posted by:  Remy Lebeau \(Indy Team\) (no.spam@no.spam.com)
Date: Tue, 7 Jul 2009

"Avi Jackobson" <omerso…@inter.net.il> wrote in message
news:3D0AD72B2488E340omerso…@inter.net.il...

> There Is Ready Function That Detect If Internet Is Connected ?

Not in Indy, no.  You would have to attempt an actual connection to a real
server, and see if it succeeds or fails.  I wouldn't recommend using TIdSMTP
or an SMTP server for that, though.  Just to avoid the handshaking that SMTP
requires.  You are better off using TIdTCPClient directly instead, and
should connect to a public website, such aswww.yahoo.com.

Otherwise, look at Microsoft's WinInet API instead:

    How To Detecting If You Have a Connection to the Internet
  http://support.microsoft.com/kb/242558

--
Remy Lebeau (TeamB)

Replies

In response to

There Is Function That Detect If Internet Is Connected ? posted by Avi Jackobson on Tue, 7 Jul 2009