cURL / Mailing Lists / curl-users / Single Mail

curl-users

need clarity on CURLOPT_CONNECTTIMEOUT

From: <curl_at_joelfire.com>
Date: Tue, 25 Sep 2012 17:15:10 -0400

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),

I also found this thread:

https://github.com/typhoeus/typhoeus/issues/33

"As far as the SIGALRM restriction is concerned, its simply the way
libcurl triggers any timeout, so it also applies to the TIMEOUT option
as well. This signal is conforming to SVr4, POSIX.1-2001 and 4.3BSD,
meaning it works on mostly everything except Windows. "

This seems to indicate that neither option will have any effect on
Windows, but I am fairy sure that, at least in the case of
CURLOPT_TIMEOUT, it *does* work.

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

-j
-------------------------------------------------------------------
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-25