1CURLOPT_TCP_FASTOPEN(3)    curl_easy_setopt options    CURLOPT_TCP_FASTOPEN(3)
2
3
4

NAME

6       CURLOPT_TCP_FASTOPEN - TCP Fast Open
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode  curl_easy_setopt(CURL *handle, CURLOPT_TCP_FASTOPEN, long en‐
12       able);
13

DESCRIPTION

15       Pass a long as parameter set to 1L to enable or 0 to disable.
16
17       TCP Fast Open (RFC7413) is a mechanism that allows data to  be  carried
18       in the SYN and SYN-ACK packets and consumed by the receiving end during
19       the initial connection handshake, saving up to one full round-trip time
20       (RTT).
21

DEFAULT

23       0
24

PROTOCOLS

26       All
27

EXAMPLE

29       CURL *curl = curl_easy_init();
30       if(curl) {
31         curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
32         curl_easy_setopt(curl, CURLOPT_TCP_FASTOPEN, 1L);
33         curl_easy_perform(curl);
34       }
35

AVAILABILITY

37       Added  in  7.49.0. This option is currently only supported on Linux and
38       OS X El Capitan.
39

RETURN VALUE

41       Returns CURLE_OK if fast open is supported  by  the  operating  system,
42       otherwise returns CURLE_NOT_BUILT_IN.
43

SEE ALSO

45       CURLOPT_SSL_FALSESTART(3),
46
47
48
49libcurl 7.79.1                September 08, 2021       CURLOPT_TCP_FASTOPEN(3)
Impressum