cURL / Mailing Lists / curl-library / Single Mail


Easy w/callback supports 1 simultaneous connection

From: Max Polk <>
Date: Wed, 26 Oct 2011 15:06:50 -0400

It appears that an easy handle is entangled with request-specific CURLOPT_WRITEDATA callback info, used to receive data for that single request, as well as entangled with the request-specific CURLINFO_RESPONSE_CODE (curl_easy_getinfo), used to get the HTTP response code. The handle therefore cannot be modified for the life of the request, which shrinks support to effectively 1 connection at a time.

If this is true, I feel that when using the easy interface (no multi) in this manner, it becomes wasteful to use the default persistent connection cache of size 5, since under my usage constraints only 1 can be used at a time, and therefore I should always set CURLOPT_MAXCONNECTS to 1.

Can I get verification on this line of reasoning?
List admin:
Received on 2011-10-26