CURLMOPT_MAX_TOTAL_CONNECTIONS - Online Linux Manual PageSection : 3
Updated : November 26, 2021
Source : libcurl 7.82.0
Note : curl_multi_setopt options

NAMECURLMOPT_MAX_TOTAL_CONNECTIONS − max simultaneously open connections

SYNOPSIS#include <curl/curl.h> CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_MAX_TOTAL_CONNECTIONS, long amount);

DESCRIPTIONPass a long for the amount. The set number will be used as the maximum number of simultaneously open connections in total using this multi handle. For each new session, libcurl will open a new connection up to the limit set by CURLMOPT_MAX_TOTAL_CONNECTIONS(3). When the limit is reached, the sessions will be pending until there are available connections. If CURLMOPT_PIPELINING(3) is enabled, libcurl will try to use multiplexing if the host is capable of it. When more transfers are added to the multi handle than what can be performed due to the set limit, they will be queued up waiting for their chance. When that happens, the CURLOPT_TIMEOUT_MS(3) timeout will be counted inclusive of the waiting time, meaning that if you set a too narrow timeout in such a case the transfer might never even start before it times out. Even in the queued up situation, the CURLOPT_CONNECTTIMEOUT_MS(3) timeout is however treated as a per-connect timeout.

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

PROTOCOLSAll

EXAMPLECURLM *m = curl_multi_init(); /* never do more than 15 connections */ curl_multi_setopt(m, CURLMOPT_MAX_TOTAL_CONNECTIONS, 15L);

AVAILABILITYAdded in 7.30.0

RETURN VALUEReturns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not.

SEE ALSOCURLMOPT_MAXCONNECTS(3), CURLMOPT_MAX_HOST_CONNECTIONS (3),"
0
Johanes Gumabo
Data Size   :   5,593 byte
man-CURLMOPT_MAX_TOTAL_CONNECTIONS.3Build   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   3 / 172,691
Visitor ID   :     :  
Visitor IP   :   3.147.78.249   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.