I am using the default resolve option of libcurl
curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_WHATEVER);
When the libcurl resolve the host addresses and get both IPv4 addresses and IPv6 addresses, what address will be use libcurl first IPv4 or IPv6? what is the algorithm used by libcurl to choose what ip address to use first?
is there a way to force libcurl to use first all ipv6 addresses, and if they fails then go to the ipv4 address?