Hello

I have this piece of code:

                curl_easy_setopt(cURL, CURLOPT_TIMEOUT, 5);
                curl_ret_status = curl_easy_perform(cURL);
                if (CURLE_OK == curl_ret_status) {
                        printf("Operation successful\n");
                } else if (CURLE_OPERATION_TIMEDOUT == curl_ret_status) {
                        printf("Operation timed out\n");
                }

I expect the curl_ret_status to be "CURLE_OPERATION_TIMEDOUT" if 
curl_easy_perform() takes more than 5 seconds. However, when the operation 
times out, I get instead "CURLE_COULDNT_RESOLVE_HOST". Is this expected? How 
can one differentiate between an unresolvable host and an actual time-out?

Thanks
-Khaled
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to