cURL / Mailing Lists / curl-library / Single Mail

curl-library

libcurl 7.18.2: Question on CURLMOPT_MAXCONNECTS

From: Stefan Krause <stefan.krause_at_gmx.net>
Date: Thu, 26 Jun 2008 21:15:28 +0200

Hello libcurl users,

CURLMOPT_MAXCONNECTS is "the maximum amount of simultaneously open
connections that libcurl may cache" according to the API description.
That means that at most CURLMOPT_MAXCONNECTS number of sockets are open
in parallel ?
So, does that parameter in fact limit the number of sockets open at a
certain time ?

"Default is 10, and libcurl will enlarge the size for each added easy
handle to make it fit 4 times the number of added easy handles"
So, a multi handle without easy handles cashes max. 10 connections. In
case I add 4 easy handles, how many connections are cached ? 10
(default) + 4 (easy handles) * 4 = 26 or 4 (easy handles) * 4 = 16 ?
What is the formula ?

What happens in case I set the CURLMOPT_MAXCONNECTS to 10 and then add
20 easy handles ? Are the 20 easy handles processed properly ? Or will
there be conflicts among the easy handles due to the limited number of
connections ?

Kind regards,
   Stefan
Received on 2008-06-26