1CURLMOPT_PIPELINING(3) curl_multi_setopt options CURLMOPT_PIPELINING(3)
2
3
4
6 CURLMOPT_PIPELINING - enable HTTP pipelining and multiplexing
7
9 #include <curl/curl.h>
10
11 CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_PIPELINING, long
12 bitmask);
13
15 Pass in the bitmask parameter to instruct libcurl to enable HTTP pipe‐
16 lining and/or HTTP/2 multiplexing for this multi handle.
17
18 When enabled, libcurl will attempt to use those protocol features when
19 doing parallel requests to the same hosts.
20
21 For pipelining, this means that if you add a second request that can
22 use an already existing connection, the second request will be "piped"
23 on the same connection rather than being executed in parallel.
24
25 For multiplexing, this means that follow-up requests can re-use an
26 existing connection and send the new request multiplexed over that at
27 the same time as other transfers are already using that single connec‐
28 tion.
29
30 There are several other related options that are interesting to tweak
31 and adjust to alter how libcurl spreads out requests on different con‐
32 nections or not etc.
33
34 Before 7.43.0, this option was set to 1 and 0 to enable and disable
35 HTTP/1.1 pipelining.
36
37 Starting in 7.43.0, bitmask's second bit also has a meaning, and you
38 can ask for pipelining and multiplexing independently of each other by
39 toggling the correct bits.
40
41 CURLPIPE_NOTHING
42 Default, which means doing no attempts at pipelining or multiplexing.
43
44 CURLPIPE_HTTP1
45 If this bit is set, libcurl will try to pipeline HTTP/1.1 requests on
46 connections that are already established and in use to hosts.
47
48 CURLPIPE_MULTIPLEX
49 If this bit is set, libcurl will try to multiplex the new transfer
50 over an existing connection if possible. This requires HTTP/2.
51
53 0 (both pipeline and multiplexing are off)
54
56 HTTP(S)
57
59 CURLM *m = curl_multi_init();
60 /* try HTTP/1 pipelining and HTTP/2 multiplexing */
61 curl_multi_setopt(m, CURLMOPT_PIPELINING, CURLPIPE_HTTP1 |
62 CURLPIPE_MULTIPLEX);
63
65 Added in 7.16.0. Multiplex support bit added in 7.43.0.
66
68 Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION
69 if not.
70
72 CURLMOPT_MAX_PIPELINE_LENGTH(3), CURLMOPT_PIPELINING_SITE_BL(3), CURL‐
73 MOPT_CONTENT_LENGTH_PENALTY_SIZE(3), CURL‐
74 MOPT_CHUNK_LENGTH_PENALTY_SIZE(3), CURLMOPT_MAX_HOST_CONNECTIONS(3),
75 CURLMOPT_MAXCONNECTS(3), CURLMOPT_MAX_HOST_CONNECTIONS(3),
76
77
78
79libcurl 7.61.1 May 27, 2017 CURLMOPT_PIPELINING(3)