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

NAME

6       CURLOPT_TCP_FASTOPEN - enable TCP Fast Open
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode   curl_easy_setopt(CURL  *handle,  CURLOPT_TCP_FASTOPEN,  long
12       enable);
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, "http://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
44
45
46libcurl 7.61.1                   May 15, 2017          CURLOPT_TCP_FASTOPEN(3)
Impressum