cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Problem using curl easy Milli Seconds time out options ...

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Tue, 30 Sep 2008 10:45:28 -0700

On Tue, Sep 30, 2008 at 09:56:45PM +0530, Mukul Kedare wrote:
> I am using curl easy interface in my application, was trying to set
> CURLOPT_CONNECTTIMEOUT_MS and CURLOPT_TIMEOUT_MS options using curl_easy_setopt
> .
> curl_easy_setopt(curl_handle,
> CURLOPT_CONNECTTIMEOUT_MS, 20);
> curl_easy_setopt(curl_handle,
> CURLOPT_TIMEOUT_MS, 30);
>
>
> However the curl easy interface is not timing out in milli seconds unit but the
> same is working fine with timouts in second options ie ..
> CURLOPT_CONNECTTIMEOUT and CURLOPT_TIMEOUT.
> curl_easy_setopt(curl_handle,
> CURLOPT_CONNECTTIMEOUT, 1);
> curl_easy_setopt(curl_handle, CURLOPT_TIMEOUT,
> 1);
>
> What could be the reason that millisecond time out options are not working, is
> there any way to fix this issue.
> The curl_easy_setopt man page says that the MS options were added in version
> 7.16.2 and am using curl 7.17.0.

Some timeouts are limited to a minimum of 1 second when using a synchronous
host resolver. Try enabling C-Ares in your libcurl build and see if that
works any better.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2008-09-30