CURLMOPT_PIPELINING(3)

✨ CURLMOPT_PIPELINING(3) ✨

okay so welcome to the CURLMOPT_PIPELINING(3) page from the Library Functions Manual πŸ’– β€” it's literally about enabling HTTP multiplexing, and we're gonna get into it. Bestie, this is the multi-handle setting for multiplexing vibes. πŸ¦‹


🌸 NAME 🌸

CURLMOPT_PIPELINING β€” enable HTTP multiplexing. That's the whole name vibe, and it ate. πŸ‘‘

πŸ¦‹ SYNOPSIS πŸ¦‹

#include <curl/curl.h>

CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_PIPELINING, long bitmask);

πŸ’… DESCRIPTION πŸ’…

Pass in the correct value in the bitmask parameter to instruct libcurl to enable multiplexing for this multi handle. No cap.

With multiplexing enabled, libcurl attempts to do multiple transfers over the same connection when doing parallel transfers to the same hosts. That's the whole point, bestie. ✨

  • CURLPIPE_NOTHING (0) β€” make no attempts at multiplexing. 🚫
  • CURLPIPE_HTTP1 (1) β€” this bit is deprecated and has no effect since version 7.62.0. ⚠️ Deprecated alert, don't sleep on it.
  • CURLPIPE_MULTIPLEX (2) β€” if this bit is set, libcurl tries to multiplex the new transfer over an existing connection if possible. This requires HTTP/2 or HTTP/3. πŸš€

πŸŽ€ DEFAULT πŸŽ€

The default is CURLPIPE_MULTIPLEX. Periodt. πŸ’…

🌈 PROTOCOLS 🌈

This functionality affects http only. 🫢

πŸ“ EXAMPLE πŸ“

Here's the example, literally:

int main(void)
{
  CURLM *m = curl_multi_init();
  /* try HTTP/2 multiplexing */
  curl_multi_setopt(m, CURLMOPT_PIPELINING, CURLPIPE_MULTIPLEX);
}

πŸ•°οΈ HISTORY πŸ•°οΈ

The multiplex support bit was added in 7.43.0. HTTP/1 Pipelining support was disabled in 7.62.0.

Since 7.62.0, CURLPIPE_MULTIPLEX is enabled by default. ✨

Before that, default was CURLPIPE_NOTHING.

⭐ AVAILABILITY ⭐

Added in curl 7.16.0. πŸ’–

πŸ”₯ RETURN VALUE πŸ”₯

curl_multi_setopt(3) returns a CURLMcode indicating success or error.

CURLM_OK (0) means everything was OK, non-zero means an error occurred, see libcurl-errors(3). 🫢

πŸ‘‘ SEE ALSO πŸ‘‘

xoxo, libcurl πŸ’– β€” dated 2026-10-12 ✨

πŸ“¦ where this page comes from