curl-library
Re: check internet connection with curl
Date: Thu, 24 Apr 2008 12:36:03 +0200
thanks for the explanation about pings.
what about doing ping to one major site like google.com
and according to the result determine if im online or not .
the reason i need this check is that the client need to preform his
best guess when there is
internet connection after loosing connection .
On Thu, Apr 24, 2008 at 10:30 AM, Gary Maxwell <gmaxwell_at_casabi.com> wrote:
> Meir Yanovich wrote:
> >
> > well all i like to do is simple ping/echo test to see if there is
> > internet connection
> > something like "ping www.google.com" check if im getting response and
> > keep doing it
> > every N seconds .
> > the problem with this that i dont what to flode google with pings
> > and also i dont know if google decide to change there domain name to
> > something else
> > then my application will not work.
> >
> > On Wed, Apr 23, 2008 at 7:55 PM, Gary Maxwell <gmaxwell_at_casabi.com>
> wrote:
> > >
>
> > > If you would clarify what you are trying to accomplish (my guess is
> > > avoiding a delay when curl_easy_perform fails to connect), we could
> > > offer better suggestions.
> > >
> > > -Gary
> > >
>
> If you would study how internet protocols work, then you would
> understand how difficult your request is. (If it were simple, wouldn't
> everyone be using it?) ICMP ping is very unreliable, since it is readily
> dropped by many routers and servers, proving nothing.
>
> Can you please explain why do you need to do this?
>
> -Gary
>
Received on 2008-04-24