summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAnders Bakken <agbakken@gmail.com>2018-01-30 16:33:51 -0800
committerJay Satiro <raysatiro@yahoo.com>2018-02-20 17:51:43 -0500
commit2427d94c6d088b13ad971bb3cee5b7de42b37d24 (patch)
treebbec8183cff0f20d8bd214abdcab5b66f1737669 /include
parent73050fb6ae3c58b6e5d085e8463d94b79dbf2737 (diff)
downloadcurl-2427d94c6d088b13ad971bb3cee5b7de42b37d24.tar.gz
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
Diffstat (limited to 'include')
-rw-r--r--include/curl/curl.h8
1 files changed, 8 insertions, 0 deletions
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;