>> 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.
Received on 2011-08-01