1CURLOPT_HAPPY_EYEBALLS_TIMEOcUuTr_lM_Se(a3s)y_setoptCUoRpLtOiPoTn_sHAPPY_EYEBALLS_TIMEOUT_MS(3)
2
3
4

NAME

6       CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS  - head start for ipv6 for happy eye‐
7       balls
8

SYNOPSIS

10       #include <curl/curl.h>
11
12       CURLcode  curl_easy_setopt(CURL  *handle,  CURLOPT_HAPPY_EYEBALLS_TIME‐
13       OUT_MS, long timeout);
14

DESCRIPTION

16       Happy  eyeballs  is  an algorithm that attempts to connect to both IPv4
17       and IPv6 addresses for dual-stack  hosts,  preferring  IPv6  first  for
18       timeout milliseconds. If the IPv6 address cannot be connected to within
19       that time then a connection attempt is made to the IPv4 address in par‐
20       allel. The first connection to be established is the one that is used.
21
22       The range of suggested useful values for timeout is limited. Happy Eye‐
23       balls RFC 6555 says "It is  RECOMMENDED  that  connection  attempts  be
24       paced  150-250 ms apart to balance human factors against network load."
25       libcurl currently defaults to 200  ms.  Firefox  and  Chrome  currently
26       default to 300 ms.
27

DEFAULT

29       CURL_HET_DEFAULT (currently defined as 200L)
30

EXAMPLE

32       CURL *curl = curl_easy_init();
33       if(curl) {
34         curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
35         curl_easy_setopt(curl, CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS, 300L);
36
37         curl_easy_perform(curl);
38
39         /* always cleanup */
40         curl_easy_cleanup(curl);
41       }
42

AVAILABILITY

44       Added in 7.59.0
45

RETURN VALUE

47       Returns CURLE_OK
48
49
50
51libcurl 7.61.1                 February 21,CU2R0L1O8PT_HAPPY_EYEBALLS_TIMEOUT_MS(3)
Impressum