GNURLOPT_SSL_ENABLE_ALPN(3)
π GNURLOPT_SSL_ENABLE_ALPN(3) π
okay bestie, welcome to the GNURLOPT_SSL_ENABLE_ALPN(3) manual page β it's one of the curl_easy_setopt options and it's here to explain ALPN enable/disable vibes. π
β¨ NAME β¨
CURLOPT_SSL_ENABLE_ALPN β enable ALPN. That's the whole name vibe, no cap.
π¦ SYNOPSIS π¦
#include <gnurl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_ENABLE_ALPN, long
npn);
πΈ DESCRIPTION πΈ
You pass a long as the parameter, bestie β 0 or 1, where 1 is for enable and 0 is for disable. This option enables/disables ALPN in the SSL handshake (if the SSL backend libcurl is built to use supports it), which can be used to negotiate http2. Iconic behavior honestly. β¨
π DEFAULT π
1, enabled. So it's on by default β main character energy. π
π PROTOCOLS π
This one's for HTTP, bestie. π
π EXAMPLE π
Here's the example, copied exactly because we do not mess with code: π
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_SSL_ENABLE_ALPN, 0L);
ret = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
β AVAILABILITY β
Added in 7.36.0. Periodt.
π«Ά RETURN VALUE π«Ά
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. That's the whole return-value tea. β
π SEE ALSO π
Cute sign-off: source/version libcurl 7.37.0, date 19 Jun 2014 β mwah π, bye bestie! π§
π¦ 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