curl-library
Re: CURLOPT_CONNECTTIMEOUT_MS/CURLOPT_TIMEOUT_MS
Date: Mon, 31 Jan 2011 10:16:42 +0100 (CET)
On Sun, 30 Jan 2011, CHENG LIANG wrote:
> 1) what kind of configutation should I use to make libcurl work for
> CURLOPT_CONNECTTIMEOUT_MS?
All configs work.
> I found follwoing from website but I didn't figure out how to compile
> libcurl to not use standard name resolver. Like CURLOPT_CONNECTTIMEOUT but
> takes the number of milliseconds instead. If libcurl is built to use the
> standard system name resolver, that portion of the connect will still use
> full-second resolution for timeouts with a minimum timeout allowed of one
> second.
That is correct that the name resolving phase with the synchronous name
resolver is full seconds, but it doesn't mean that CURLOPT_CONNECTTIMEOUT_MS
doesn't work. It just means that it has less resolution during the name
resolution part of the connection.
You build libcurl to use an alternative resolver by using c-ares or the
threaded resolver options.
> 2) does option CURLOPT_CONNECTTIMEOUT_MS/CURLOPT_TIMEOUT_MS only used for
> system name resolver?
No.
> does system name resolver is same as convertion from host name to IP
> address?
Converting name to IP is what name resolving means.
> How about if I use IP address instead of host name in the http request?
Then there is no name resolving done.
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2011-01-31