Sortix volatile manual
This manual documents Sortix volatile, a development build that has not been officially released. You can instead view this document in the latest official manual.
CURLOPT_MAXCONNECTS(3) | Library Functions Manual | CURLOPT_MAXCONNECTS(3) |
NAME
CURLOPT_MAXCONNECTS - maximum connection cache sizeSYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MAXCONNECTS, long amount);
DESCRIPTION
Pass a long. The set amount is the maximum number of simultaneously open persistent connections that libcurl may cache in the pool associated with this handle. The default is 5, and there is not much point in changing this value unless you are perfectly aware of how this works. This concerns connections using any of the protocols that support persistent connections.DEFAULT
5PROTOCOLS
This functionality affects all supported protocolsEXAMPLE
int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
CURLcode ret;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
/* limit the connection cache for this handle to no more than 3 */
curl_easy_setopt(curl, CURLOPT_MAXCONNECTS, 3L);
ret = curl_easy_perform(curl);
}
}
AVAILABILITY
Added in curl 7.7RETURN VALUE
Returns CURLE_OKSEE ALSO
CURLMOPT_MAXCONNECTS(3), CURLMOPT_MAX_HOST_CONNECTIONS(3), CURLMOPT_MAX_TOTAL_CONNECTIONS(3), CURLOPT_MAXREDIRS(3)2024-11-23 | libcurl |