GNURLMOPT...INE_LENGTH(3)

๐Ÿ“ฆ version 7.72.0, in nixos 26.05, nixpkgs unstable

๐ŸŽ€ 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