GNURLOPT_TCP_FASTOPEN(3)
β¨ NAME β¨
Okay so this is the GNURLOPT_TCP_FASTOPEN(3) manual page, and it's all about CURLOPT_TCP_FASTOPEN β the option that enables TCP Fast Open. Periodt. π
πΈ SYNOPSIS πΈ
#include <gnurl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TCP_FASTOPEN, long
enable);
π¦ DESCRIPTION π¦
You pass a long as the parameter, and you set it to 1L to enable or 0 to disable. That's the whole vibe. β¨
TCP Fast Open (RFC7413) is literally a mechanism that allows data to be carried in the SYN and SYN-ACK packets and consumed by the receiving end during the initial connection handshake. The glow-up? It saves up to one full round-trip time (RTT). No cap. π₯
π DEFAULT π
The default is 0. So it's off unless you turn it on, bestie β you gotta opt in. π€
π PROTOCOLS π
All. Every protocol, no gatekeeping. π«Ά
π EXAMPLE π
Here's the whole vibe in code β keep it exactly like this, okay? π
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
curl_easy_setopt(curl, CURLOPT_TCP_FASTOPEN, 1L);
curl_easy_perform(curl);
}
π§ AVAILABILITY π§
Added in 7.49.0. This option is currently only supported on Linux and OS X El Capitan β yes, specifically El Capitan, iykyk. π
π RETURN VALUE π
Returns CURLE_OK if fast open is supported by the operating system, otherwise returns CURLE_NOT_BUILT_IN. No in-between, bestie. π
k bye bestie! π«Ά this page came from libcurl 7.49.0, dated 16 Feb 2016, and it's the GNURLOPT_TCP_FASTOPEN(3) page β mwah π
π¦ where this page comes from
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms