1--- 2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. 3SPDX-License-Identifier: curl 4Title: CURLMOPT_PIPELINING 5Section: 3 6Source: libcurl 7See-also: 8 - CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE (3) 9 - CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE (3) 10 - CURLMOPT_MAXCONNECTS (3) 11 - CURLMOPT_MAX_HOST_CONNECTIONS (3) 12 - CURLMOPT_MAX_PIPELINE_LENGTH (3) 13 - CURLMOPT_PIPELINING_SITE_BL (3) 14Protocol: 15 - HTTP 16--- 17 18# NAME 19 20CURLMOPT_PIPELINING - enable HTTP multiplexing 21 22# SYNOPSIS 23 24~~~c 25#include <curl/curl.h> 26 27CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_PIPELINING, long bitmask); 28~~~ 29 30# DESCRIPTION 31 32Pass in the correct value in the **bitmask** parameter to instruct libcurl to 33enable multiplexing for this multi handle. 34 35With multiplexing enabled, libcurl attempts to do multiple transfers over the 36same connection when doing parallel transfers to the same hosts. 37 38## CURLPIPE_NOTHING (0) 39 40Default, which means doing no attempts at multiplexing. 41 42## CURLPIPE_HTTP1 (1) 43 44This bit is deprecated and has no effect since version 7.62.0. 45 46## CURLPIPE_MULTIPLEX (2) 47 48If this bit is set, libcurl tries to multiplex the new transfer over an 49existing connection if possible. This requires HTTP/2 or HTTP/3. 50 51# DEFAULT 52 53Since 7.62.0, **CURLPIPE_MULTIPLEX** is enabled by default. 54 55Before that, default was **CURLPIPE_NOTHING**. 56 57# EXAMPLE 58 59~~~c 60int main(void) 61{ 62 CURLM *m = curl_multi_init(); 63 /* try HTTP/2 multiplexing */ 64 curl_multi_setopt(m, CURLMOPT_PIPELINING, CURLPIPE_MULTIPLEX); 65} 66~~~ 67 68# AVAILABILITY 69 70Added in 7.16.0. Multiplex support bit added in 7.43.0. HTTP/1 Pipelining 71support was disabled in 7.62.0. 72 73# RETURN VALUE 74 75Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not. 76