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
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        This bit is deprecated and has no effect since version 7.62.0.
49
50       CURLPIPE_MULTIPLEX
51         If  this  bit  is set, libcurl will try to multiplex the new transfer
52         over an existing connection if possible. This requires HTTP/2.
53

DEFAULT

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

PROTOCOLS

60       HTTP(S)
61

EXAMPLE

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

AVAILABILITY

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

RETURN VALUE

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

SEE ALSO

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.69.1                  April 05, 2019          CURLMOPT_PIPELINING(3)
Impressum