From 2427d94c6d088b13ad971bb3cee5b7de42b37d24 Mon Sep 17 00:00:00 2001 From: Anders Bakken Date: Tue, 30 Jan 2018 16:33:51 -0800 Subject: url: Add option CURLOPT_HAPPY_EYEBALLS_TIMEOUT - Add new option CURLOPT_HAPPY_EYEBALLS_TIMEOUT to set libcurl's happy eyeball timeout value. - Add new optval macro CURL_HET_DEFAULT to represent the default happy eyeballs timeout value (currently 200 ms). - Add new tool option --happy-eyeballs-timeout-ms to expose CURLOPT_HAPPY_EYEBALLS_TIMEOUT. The -ms suffix is used because the other -timeout options in the tool expect seconds not milliseconds. Closes https://github.com/curl/curl/pull/2260 --- include/curl/curl.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 7cab0a16c..a592a0e4d 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -791,6 +791,11 @@ typedef enum { SSL backends where such behavior is present. */ #define CURLSSLOPT_NO_REVOKE (1<<1) +/* The default connection attempt delay in milliseconds for happy eyeballs. + CURLOPT_HAPPY_EYEBALLS_TIMEOUT.3 and happy-eyeballs-timeout-ms.d document + this value, keep them in sync. */ +#define CURL_HET_DEFAULT 200L + #ifndef CURL_NO_OLDIES /* define this to test if your app builds with all the obsolete stuff removed! */ @@ -1825,6 +1830,9 @@ typedef enum { seconds since 1 Jan 1970. */ CINIT(TIMEVALUE_LARGE, OFF_T, 270), + /* Head start in milliseconds to give happy eyeballs. */ + CINIT(HAPPY_EYEBALLS_TIMEOUT, LONG, 271), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; -- cgit v1.2.3