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?
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 :-(
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With