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 enable);
12

DESCRIPTION

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

DEFAULT

22       0
23

PROTOCOLS

25       All
26

EXAMPLE

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

AVAILABILITY

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

RETURN VALUE

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

SEE ALSO

44       CURLOPT_SSL_FALSESTART(3),
45
46
47
48libcurl 7.82.0                 November 26, 2021       CURLOPT_TCP_FASTOPEN(3)
Impressum