1CURLMOPT_MAX_TOTAL_CONNECTIOcNuSr(l3_)multi_setopt oCpUtRiLoMnOsPT_MAX_TOTAL_CONNECTIONS(3)
2
3
4

NAME

6       CURLMOPT_MAX_TOTAL_CONNECTIONS - max simultaneously open connections
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLMcode  curl_multi_setopt(CURLM  *handle, CURLMOPT_MAX_TOTAL_CONNEC‐
12       TIONS, long amount);
13

DESCRIPTION

15       Pass a long for the amount. The set number will be used as the  maximum
16       number  of  simultaneously  open  connections in total using this multi
17       handle. For each new session, libcurl will open a new connection up  to
18       the  limit  set by CURLMOPT_MAX_TOTAL_CONNECTIONS(3). When the limit is
19       reached, the sessions will be pending until there are available connec‐
20       tions.  If CURLMOPT_PIPELINING(3) is enabled, libcurl will try to pipe‐
21       line or use multiplexing if the host is capable of it.
22

DEFAULT

24       The default value is 0, which means that there is no limit. It is  then
25       simply controlled by the number of easy handles added.
26

PROTOCOLS

28       All
29

EXAMPLE

31       CURLM *m = curl_multi_init();
32       /* never do more than 15 connections */
33       curl_multi_setopt(m, CURLMOPT_MAX_TOTAL_CONNECTIONS, 15L);
34

AVAILABILITY

36       Added in 7.30.0
37

RETURN VALUE

39       Returns  CURLM_OK  if the option is supported, and CURLM_UNKNOWN_OPTION
40       if not.
41

SEE ALSO

43       CURLMOPT_MAXCONNECTS(3), CURLMOPT_MAX_HOST_CONNECTIONS(3),
44
45
46
47libcurl 7.64.0                   May 27, 2017CURLMOPT_MAX_TOTAL_CONNECTIONS(3)
Impressum