#include int main() { curl_global_init(CURL_GLOBAL_ALL); printf("hello %s\n", curl_version()); CURL * master_handle, * secondary_handle; int ret; master_handle = curl_easy_init(); curl_easy_setopt(master_handle, CURLOPT_VERBOSE, 1); curl_easy_setopt(master_handle, CURLOPT_FAILONERROR, 1); ret = curl_easy_setopt(master_handle, CURLOPT_DNS_SERVERS, "9.9.9.9:9999"); if (ret) { printf("ERROR %s!\n", curl_easy_strerror(ret)); return 1; } secondary_handle = curl_easy_duphandle(master_handle); curl_easy_setopt(secondary_handle, CURLOPT_URL, "http://really.not.a.server/"); curl_easy_perform(secondary_handle); if (ret) { printf("ERROR %s!\n", curl_easy_strerror(ret)); return 1; } return 0; }