cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: enabling curl easy milliseconds time out options

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 29 Oct 2008 23:15:16 +0100 (CET)

On Tue, 28 Oct 2008, Jovial Shah wrote:

> With reference to this thread,
> http://curl.haxx.se/mail/lib-2008-09/0320.html
>
> My client application is using libCurl-7.18-1 and I see response times of
> 10-20 msec. However, when I set the CURLOPT_TIMEOUT_MS to 999 ms, I get a
> timeout. Whereas if I set it as CURLOPT_TIMEOUT_MS as 1000 msec, I get back
> a response.
>
> After reading the previous thread, it appears that I need to build
> libCurl with C-Ares enabled.

Yes, subsecond timeouts don't work properly on non-windows systems unless you
do that.

> How does one build libCurl with C-Ares enabled ?

./configure --enable-ares=PATH

> Are there any other alternatives ?

Not really. You _could_ change the use of alarm() internally to instead use
setitimer() but that would of course take some editing of source code.

-- 
  / daniel.haxx.se
Received on 2008-10-29