GNURLMOPT...INE_LENGTH(3)
๐ GNURLMOPT...INE_LENGTH(3) ๐
okay so bestie, this page lives in the curl_multi_setopt options family โ it's the whole manual-name vibe, that's the collection it belongs to. Buckle up, it's a short one but there's lore ๐
โจ NAME โจ
CURLMOPT_MAX_PIPELINE_LENGTH โ the max number of requests you can cram into a pipeline, literally that's it ๐ซถ
๐ SYNOPSIS ๐
#include <gnurl/curl.h>
CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_MAX_PIPELINE_LENGTH,
long max);
๐ DESCRIPTION ๐
Okay so first thing's first, and this is kind of the whole ~storyline~: there is no function anymore ๐ญ pipelining got removed way back in 7.62.0, so this option is giving "ghost of options past" energy.
But for the historical record ngl: you pass a long. That max number you set gets used as the maximum amount of outstanding requests allowed on an HTTP/1.1 pipelined connection. Key detail bestie โ this option is only used for HTTP/1.1 pipelining, not for HTTP/2 multiplexing. Two totally different vibes, don't mix them up ๐
When you actually hit that limit, libcurl goes and grabs another connection to the same host (peep CURLMOPT_MAX_HOST_CONNECTIONS(3)), or it just queues your request until one of the pipelines to that host is ready to accept it. Patience era โจ
So the total number of requests in-flight works out to:
CURLMOPT_MAX_HOST_CONNECTIONS(3) * CURLMOPT_MAX_PIPELINE_LENGTH(3)
That's the math, no cap ๐งฎ
๐ธ DEFAULT ๐ธ
5
(five, that's the number, iconic, love that for us)
๐ฆ PROTOCOLS ๐ฆ
HTTP(S)
โญ EXAMPLE โญ
CURLM *m = curl_multi_init();
/* set a more conservative pipe length */
curl_multi_setopt(m, CURLMOPT_MAX_PIPELINE_LENGTH, 3L);
look at that, three, so conservative, so demure ๐
๐ AVAILABILITY ๐
Added in 7.30.0 โ a real one, she existed ๐
๐ RETURN VALUE ๐
Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not. Simple, clean, no drama ๐
๐ SEE ALSO ๐
(yeah the trailing comma is in the original, she's just like that, leave her alone ๐)
so yeah that's the whole page bestie, short and sweet ๐ this iconic little number comes to you straight from libcurl 7.39.0, dated 4 Nov 2014, filed under GNURLMOPT...INE_LENGTH(3) โ mwah, go forth and pipeline (or don't, apparently, since 7.62.0 ๐ญ) ๐โจ
๐ฆ where this page comes from
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2019, 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