Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does c-ares support IOS?

Tags:

ios

dns

c-ares

Do the c-ares support IOS? I need to use c-ares in my company's app running on IOS. But It can't work correctly using "ares_gethostbyname()" and the status code in the callback function returns 11(ARES_ECONNREFUSED) all the time . The same code runs correctly on other opearting system such as Win32, Android.

Glancing over the source code, I found the reason, that is, c-ares is unable to get dns servers on IOS. Because c-ares read the file /etc/resolv.conf to get dns servers information, but this file does not exist on IOS.

So, do the c-ares support IOS? Or What's the method on IOS to get dns servers information?

like image 769
wanghongyun Avatar asked May 12 '15 02:05

wanghongyun


1 Answers

I found a patch for this that never was merged into the master repo, posted in December 2014.

It'd be great if you could try it out and report back on the c-ares mailing list so that we can work on getting it merged and supported "officially".

/ awful c-ares maintainer :-(

like image 83
Daniel Stenberg Avatar answered Nov 20 '22 08:11

Daniel Stenberg