1CURLMOPT_PIPELINING(3)     curl_multi_setopt options    CURLMOPT_PIPELINING(3)
2
3
4

NAME

6       CURLMOPT_PIPELINING - enable HTTP pipelining and multiplexing
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLMcode  curl_multi_setopt(CURLM  *handle,  CURLMOPT_PIPELINING, long
12       bitmask);
13

DESCRIPTION

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  ex‐
26       isting connection and send the new request multiplexed over that at the
27       same time as other transfers are already using that single connection.
28
29       There are several other related options that are interesting  to  tweak
30       and  adjust to alter how libcurl spreads out requests on different con‐
31       nections or not etc.
32
33       Before 7.43.0, this option was set to 1 and 0  to  enable  and  disable
34       HTTP/1.1 pipelining.
35
36       Starting  in  7.43.0,  bitmask's second bit also has a meaning, and you
37       can ask for pipelining and multiplexing independently of each other  by
38       toggling the correct bits.
39
40       CURLPIPE_NOTHING
41       Default, which means doing no attempts at pipelining or multiplexing.
42
43       CURLPIPE_HTTP1
44        If  this bit is set, libcurl will try to pipeline HTTP/1.1 requests on
45        connections that are already established and in use to hosts.
46
47        This bit is deprecated and has no effect since version 7.62.0.
48
49       CURLPIPE_MULTIPLEX
50         If this bit is set, libcurl will try to multiplex  the  new  transfer
51         over an existing connection if possible. This requires HTTP/2.
52

DEFAULT

54       Since 7.62.0, CURLPIPE_MULTIPLEX is enabled by default.
55
56       Before that, default was CURLPIPE_NOTHING.
57

PROTOCOLS

59       HTTP(S)
60

EXAMPLE

62       CURLM *m = curl_multi_init();
63       /* try HTTP/2 multiplexing */
64       curl_multi_setopt(m, CURLMOPT_PIPELINING, CURLPIPE_MULTIPLEX);
65

AVAILABILITY

67       Added in 7.16.0. Multiplex support bit added in 7.43.0. HTTP/1 Pipelin‐
68       ing support was disabled in 7.62.0.
69

RETURN VALUE

71       Returns CURLM_OK if the option is supported,  and  CURLM_UNKNOWN_OPTION
72       if not.
73

SEE ALSO

75       CURLMOPT_MAX_PIPELINE_LENGTH(3),  CURLMOPT_PIPELINING_SITE_BL(3), CURL‐
76       MOPT_CONTENT_LENGTH_PENALTY_SIZE(3),         CURLMOPT_CHUNK_LENGTH_PEN‐
77       ALTY_SIZE(3),     CURLMOPT_MAX_HOST_CONNECTIONS(3),    CURLMOPT_MAXCON‐
78       NECTS(3), CURLMOPT_MAX_HOST_CONNECTIONS(3),
79
80
81
82libcurl 7.76.1                 November 04, 2020        CURLMOPT_PIPELINING(3)
Impressum