▲ | jnwatson 2 days ago | |
As the article mentions, why not just delegate it to a library dedicated to the solution? c-ares is a solid, well-maintained library. | ||
▲ | JosifA 2 days ago | parent [-] | |
Unfortunately, c-ares is not problem-free on all platforms. On iOS, its use triggers a local network access popup (it tries to reach your DNS server, which is often on your LAN). If a user denies acess, your app will simply not work. On Android, it's not compatible with some VPN apps. Those apps are to blame, but your users are going to blame you not them. So, at my previous company we ended up building libcurl with a threaded DNS resolver on both iOS and Android. |