cURL / Mailing Lists / curl-library / Single Mail

curl-library

Easy w/callback supports 1 simultaneous connection

From: Max Polk <maxpolk_at_gmail.com>
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: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-10-26