1---
2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
3SPDX-License-Identifier: curl
4Title: CURLMOPT_MAX_PIPELINE_LENGTH
5Section: 3
6Source: libcurl
7See-also:
8  - CURLMOPT_MAX_HOST_CONNECTIONS (3)
9  - CURLMOPT_PIPELINING (3)
10Protocol:
11  - All
12Added-in: 7.30.0
13---
14
15# NAME
16
17CURLMOPT_MAX_PIPELINE_LENGTH - maximum number of requests in a pipeline
18
19# SYNOPSIS
20
21~~~c
22#include <curl/curl.h>
23
24CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_MAX_PIPELINE_LENGTH,
25                            long max);
26~~~
27
28# DESCRIPTION
29
30No function since pipelining was removed in 7.62.0.
31
32Pass a long. The set **max** number is used as the maximum amount of
33outstanding requests in an HTTP/1.1 pipeline. This option is only used for
34HTTP/1.1 pipelining, not for HTTP/2 multiplexing.
35
36When this limit is reached, libcurl creates another connection to the same
37host (see CURLMOPT_MAX_HOST_CONNECTIONS(3)), or queue the request until one
38    of the pipelines to the host is ready to accept a request. Thus, the total
39number of requests in-flight is CURLMOPT_MAX_HOST_CONNECTIONS(3) *
40CURLMOPT_MAX_PIPELINE_LENGTH(3).
41
42# DEFAULT
43
445
45
46# %PROTOCOLS%
47
48# EXAMPLE
49
50~~~c
51int main(void)
52{
53  CURLM *m = curl_multi_init();
54  /* set a more conservative pipe length */
55  curl_multi_setopt(m, CURLMOPT_MAX_PIPELINE_LENGTH, 3L);
56}
57~~~
58
59# %AVAILABILITY%
60
61# RETURN VALUE
62
63Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not.
64