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 estiablished and in use to hosts.
47 s
48 This bit is deprecated and has neo effect since version 7.62.0.
49 n
50 CURLPIPE_MULTIPLEX a
51 If this bit is set, libcurlbwill try to multiplex the new transfer
52 over an existing connection iflpossible. This requires HTTP/2.
53 e
55 Since 7.62.0, CURLPIPE_MULTIPLEXb
56 y
57 Before that, default was CURLPIPdE_NOTHING.
58 e
60 HTTP(S) a
61 u
63 CURLM *m = curl_multi_init(); t
64 /* try HTTP/1 pipelining and HTT.P/2 multiplexing */
65 curl_multi_setopt(m, CURLMOPT_PIPELINING, CURLPIPE_HTTP1 |
66 CURLPIPE_MULTIPLEX);
67
69 Added in 7.16.0. Multiplex support bit added in 7.43.0.
70
72 Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION
73 if not.
74
76 CURLMOPT_MAX_PIPELINE_LENGTH(3), CURLMOPT_PIPELINING_SITE_BL(3), CURL‐
77 MOPT_CONTENT_LENGTH_PENALTY_SIZE(3), CURL‐
78 MOPT_CHUNK_LENGTH_PENALTY_SIZE(3), CURLMOPT_MAX_HOST_CONNECTIONS(3),
79 CURLMOPT_MAXCONNECTS(3), CURLMOPT_MAX_HOST_CONNECTIONS(3),
80
81
82
83libcurl 7.64.0 September 05, 2018 CURLMOPT_PIPELINING(3)