cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: need clarity on CURLOPT_CONNECTTIMEOUT

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 26 Sep 2012 14:31:41 +0200 (CEST)

On Tue, 25 Sep 2012, curl_at_joelfire.com wrote:

Hi, you're discussing libcurl details on the curl users list. I suggest you
take it to the curl-library list if you want to reach other libcurl hackers!

> In the curl.h header, I see
>
> /* Time-out connect operations after this amount of seconds, if connects
> are OK within this time, then fine... This only aborts the connect
> phase. [Only works on unix-style/SIGALRM operating systems] */
> CINIT(CONNECTTIMEOUT, LONG, 78),

The parts within the [brackets] there isn't true and I'm a little embarrassed
that it said so and that I added that comment back in 2001... I checked and
the curl_easy_setopt() man page is correct and I've just now removed the wrong
info from the header and pushed that update.

CURLOPT_CONNECTTIMEOUT works for all systems. For systems using the default
synchronous resolver backend, libcurl will use signals to abort name resolves
- if available.

> I also found this thread:
>
> https://github.com/typhoeus/typhoeus/issues/33

That wasn't correct either it seems.

> Also, I don't see an option for setting SO_RCVTIMEO, just the connect
> timeout and the operation timeout. Is it not available?

No it isn't. We're using non-blocking sockets everywhere internally, what
exactly would you like it to do?

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2012-09-26