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 bitmask);
12

DESCRIPTION

14       Pass  in the bitmask parameter to instruct libcurl to enable HTTP pipe‐
15       lining and/or HTTP/2 multiplexing for this multi handle.
16
17       When enabled, libcurl will attempt to use those protocol features  when
18       doing parallel requests to the same hosts.
19
20       For  pipelining,  this  means that if you add a second request that can
21       use an already existing connection, the second request will be  "piped"
22       on the same connection rather than being executed in parallel.
23
24       For  multiplexing, this means that follow-up requests can re-use an ex‐
25       isting connection and send the new request multiplexed over that at the
26       same time as other transfers are already using that single connection.
27
28       There  are  several other related options that are interesting to tweak
29       and adjust to alter how libcurl spreads out requests on different  con‐
30       nections or not etc.
31
32       Before  7.43.0,  this  option  was set to 1 and 0 to enable and disable
33       HTTP/1.1 pipelining.
34
35       Starting in 7.43.0, bitmask's second bit also has a  meaning,  and  you
36       can  ask for pipelining and multiplexing independently of each other by
37       toggling the correct bits.
38
39       CURLPIPE_NOTHING
40       Default, which means doing no attempts at pipelining or multiplexing.
41
42       CURLPIPE_HTTP1
43        If this bit is set, libcurl will try to pipeline HTTP/1.1 requests  on
44        connections that are already established and in use to hosts.
45
46        This bit is deprecated and has no effect since version 7.62.0.
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

DEFAULT

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

PROTOCOLS

58       HTTP(S)
59

EXAMPLE

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

AVAILABILITY

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

RETURN VALUE

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

SEE ALSO

74       CURLMOPT_MAX_PIPELINE_LENGTH(3), CURLMOPT_PIPELINING_SITE_BL(3),  CURL‐
75       MOPT_CONTENT_LENGTH_PENALTY_SIZE(3),         CURLMOPT_CHUNK_LENGTH_PEN‐
76       ALTY_SIZE(3),    CURLMOPT_MAX_HOST_CONNECTIONS(3),     CURLMOPT_MAXCON‐
77       NECTS(3), CURLMOPT_MAX_HOST_CONNECTIONS(3),
78
79
80
81libcurl 7.82.0                 November 26, 2021        CURLMOPT_PIPELINING(3)
Impressum