Skip to content
nnseva edited this page Sep 12, 2011 · 6 revisions

The c-ares library replacement for AirplaySDK

I've implemented and posted to the CURL team some patches allowing to have a custom asynchronous name resolver linked to the CURL library.

My patches are included into libcurl starting from v.7.21.7. But yet before the patches have been included, I've already implemented a custom asynchronous resolver, as a replacement for the c-ares library which is able to be linked to the CURL as an option. As a result, the CURL library uses my replacement, and passes all resolving jobs to it.

Inside a replacement, I've organized some kind of two-dimentional queue of resolving queries to imitate c-ares behaviour. Really resolving jobs are evaluated one-by-one (as an only available option of the s3eInetLookup call), but never block the main thread because of using callbacks.

I've also implemented build option to select, whether the replacement, or the original c-ares library also ported for the AirplaySDK, should be linked against libcurl. Note that the original c-ares port should use some DNS server, f.e. Google public DNS server at 8.8.8.8, and can not use internal DNS features of the hosting device. I've found also that the original c-ares doesn't work on Windows Mobile v.6.1

Clone this wiki locally