CURLMOPT_M...INE_LENGTH(3)

πŸ’… CURLMOPT_MAX_PIPELINE_LENGTH(3) πŸ’…

okay bestie, so this is a page from the Library Functions Manual β€” yes, the curl ones, the ones you keep man-ing at 2am. sit down, hydrate, let's get into it 🫢


✨ NAME ✨

CURLMOPT_MAX_PIPELINE_LENGTH β€” the maximum number of requests you can shove into a pipeline, literally that's the whole vibe πŸŽ€


🌸 SYNOPSIS 🌸

#include <curl/curl.h>

CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_MAX_PIPELINE_LENGTH,
                            long max);

πŸ¦‹ DESCRIPTION πŸ¦‹

no cap, there's no function here anymore β€” pipelining got removed in 7.62.0. she's gone, bestie 😭 rip to a real one.

so you pass a long. the number you set becomes the maximum amount of outstanding requests allowed in an HTTP/1.1 pipeline. and listen β€” this option is only for HTTP/1.1 pipelining, not for HTTP/2 multiplexing. two completely different girls, don't mix them up πŸ’…

when you hit that limit, libcurl does one of two things: it either creates another connection to the same host (peep CURLMOPT_MAX_HOST_CONNECTIONS(3) πŸ‘€), or it queues the request until one of the pipelines to that host is ready to accept a request.

and then the original page just kinda... ends with this line, word for word, no notes:

Thus, the total CURLMOPT_MAX_PIPELINE_LENGTH(3).

yes queen, we're all confused, but we reproduce the facts exactly, that's the rule 🧚


πŸ“ DEFAULT πŸ“

5

five. iconic number. no notes ✨


🌈 PROTOCOLS 🌈

this functionality affects all supported protocols β€” all of them, every single one, we love an inclusive queen πŸ‘‘


πŸ”₯ EXAMPLE πŸ”₯

int main(void)
{
  CURLM *m = curl_multi_init();
  /* set a more conservative pipe length */
  curl_multi_setopt(m, CURLMOPT_MAX_PIPELINE_LENGTH, 3L);
}

look at the comment β€” /* set a more conservative pipe length */ β€” she's being responsible, we stan a cautious main character πŸŽ€


πŸ’– AVAILABILITY πŸ’–

added in curl 7.30.0. vintage. retro. lowkey a classic πŸ•°οΈ


⭐ RETURN VALUE ⭐

curl_multi_setopt(3) returns a CURLMcode that tells you success or error, that's it.

  • CURLM_OK (0) β€” everything was OK, we're slaying, no drama πŸ’š
  • non-zero β€” an error occurred 😭 go check libcurl-errors(3) for the full tea

πŸ‘‘ SEE ALSO πŸ‘‘

go read those next, bestie, they're fr fr relevant 🫢


and that's the whole page!! brought to you by libcurl, dated 2026-10-12 β€” mwah, kisses, go touch some grass now πŸŒΈπŸ’œ

πŸ“¦ where this page comes from