• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1---
2c: Copyright (C) Daniel Stenberg, <daniel.se>, et al.
3SPDX-License-Identifier: curl
4Title: CURLMOPT_MAX_CONCURRENT_STREAMS
5Section: 3
6Source: libcurl
7See-also:
8  - CURLMOPT_MAXCONNECTS (3)
9  - CURLOPT_MAXCONNECTS (3)
10---
11
12# NAME
13
14CURLMOPT_MAX_CONCURRENT_STREAMS - max concurrent streams for http2
15
16# SYNOPSIS
17
18~~~c
19#include <curl/curl.h>
20
21CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_MAX_CONCURRENT_STREAMS,
22                            long max);
23~~~
24
25# DESCRIPTION
26
27Pass a long indicating the **max**. The set number is used as the maximum
28number of concurrent streams libcurl should support on connections done using
29HTTP/2 or HTTP/3.
30
31Valid values range from 1 to 2147483647 (2^31 - 1) and defaults to 100. The
32value passed here would be honored based on other system resources properties.
33
34# DEFAULT
35
36100
37
38# PROTOCOLS
39
40All
41
42# EXAMPLE
43
44~~~c
45int main(void)
46{
47  CURLM *m = curl_multi_init();
48  /* max concurrent streams 200 */
49  curl_multi_setopt(m, CURLMOPT_MAX_CONCURRENT_STREAMS, 200L);
50}
51~~~
52
53# AVAILABILITY
54
55Added in 7.67.0
56
57# RETURN VALUE
58
59Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not.
60