On Tue, Sep 20, 2022 at 08:28:10PM +0000, Dmitry Karpov wrote: > Yes, I want to use dual-stack in general. That's why my application has > numerous components which use CURLOPT_IPRESOLVE = AUTO. > But if IPv6 doesn't work on a "system level", I want my curl code to be as > fast as "IPv4 only" resolve mode without changing anything in my code - like > doing detection that IPv6 doesn't work and modifying IP resolve mode in all > the places where I create and set an easy handle (that's your suggestion as I > understood it).
I still haven't seen any reason this needs to be a callback, besides that it's easier to integrate into your program. If you insist on this being a callback, then you can just call it yourself by changing your code from using curl_easy_init() everywhere to using dmitry_curl_easy_init(): CURL *dmitry_curl_easy_init(void) { CURL *c=curl_easy_init(); my_ipv6_callback(c); return c; } libcurl doesn't need a new callback mechanism to do this. Dan -- Unsubscribe: https://lists.haxx.se/listinfo/curl-library Etiquette: https://curl.se/mail/etiquette.html