cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: CheckConnection ?

From: Ralph Mitchell <ralphmitchell_at_gmail.com>
Date: Wed, 6 Jul 2005 18:20:37 -0500

Either robots.txt or index.html is likely to be available as a test
pickup. Beside, all your InternetCheckConnection function needs to do
is open a tcp socket connection to the remote server. If it connects,
drop it and crank out your curl requests.

Ralph Mitchell

On 7/6/05, Daniel Stenberg <daniel-curl_at_haxx.se> wrote:
> On Wed, 6 Jul 2005, Zibiao.Wei_at_atxinc.com wrote:
>
> > Does libcurl have an equivalent of WinINet's InternetCheckConnection
> > function?
>
> No. And what is an "internet connection" really?
>
> > Wouldn't it be nice to know that at least the client machine is Internet
> > ready before multiple download requests are sent by libcurl? Otherwise later
> > the same number of download failures will need to be handled.
>
> Then do a first check by getting something you know "always" exists on some
> public server somewhere. Then call that function InternetCheckConnection() and
> *bing*, you have it! ;-)
>
> --
> Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
>
Received on 2005-07-07