Subject: Re: c-ares on iPhone

Re: c-ares on iPhone

From: Leslie Linden <leslie_at_lindenlab.com>
Date: Mon, 1 Aug 2011 11:07:36 -0700

On a related note, does anyone know why the lib curl that comes with Mac OS
X doesn't link to c-ares? I haven't checked Lion yet but I'm quite certain
the versions with Snow Leopard and before do not use c-ares.

Has there ever been any inquiry about that from Apple?

- Leslie

> ------------------------------
>
> Message: 2
> Date: Sun, 31 Jul 2011 15:08:46 -0700
> From: Patrick Meehan <patrick_at_ziplinegames.com>
> To: c-ares hacking <c-ares_at_cool.haxx.se>
> Subject: Re: c-ares on iPhone
> Message-ID:
> <CAN8gDCmF34_DDn8Gux+0+Ept-eevX7N5eqvsK5f=HLGhtzi5yQ_at_mail.gmail.com
> >
> Content-Type: text/plain; charset=ISO-8859-1
>
> >> Can anyone help us get c-ares running properly on iPhone? We've been
> >> able to compile and run, but no luck getting it to operate.
> >
> > Can you elaborate? If it compiles and runs, what exactly is preventing it
> to
> > operate? How do you for example figure out the DNS server(s) on the
> iphone?
>
> Yes, exactly. If it compiles and runs, what would prevent it from
> operating? That is indeed my question. Have you successfully built and
> run c-ares/curl on iPhone?
>
> We did chase the execution for a bit. On iPhone c-ares never finds a
> valid path when attempting to figure out the DNS servers. During
> initialization, /etc/hosts isn't used. When it tries to get the DNS
> servers later, /etc/hosts contains only localhost. I saw the fix for
> Android and wondered if something similar is needed for iPhone.
>
> Unfortunately I don't know how to figure out the DNS servers on the
> iPhone otherwise I could be of more use. I do know that c-ares would
> be good to have; there is a 10-second delay that freezes the entire
> application from gethostbyname in both curl *and* the native iOS
> 'asynchronous' http API when a name cannot be resolved. The freezing
> is obviously a killer, and c-ares should take care of that... but I'm
> hoping we'll get the error result sooner than 10 seconds in.
>
> The workaround for now has been to keep the status quo (curl w/o
> c-ares) and use the native reachability notifications to avoid any web
> calls when connectivity is poor. Not the greatest solution, but does a
> pretty good job of avoiding blocking delays.
>
>
> ------------------------------
>
> _______________________________________________
> c-ares mailing list
> c-ares_at_cool.haxx.se
> http://cool.haxx.se/cgi-bin/mailman/listinfo/c-ares
>
>
>
Received on 2011-08-01