cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Setting number of HTTP client connections

From: Holger Rauch <Holger.Rauch_at_heitec.de>
Date: Fri, 13 Sep 2002 14:21:16 +0200 (CEST)

Hi Daniel!

Thanks a lot for your quick reply!

On Fri, 13 Sep 2002, Daniel Stenberg wrote:

> [...]
> I mean, how often do you
> really manage to communicate with more than five different servers and get
> back to them again without them having closed the connection anyway?

The problem I will be faced with is that I don't want to connect to many
different servers, but many times to the *same* server instead. That's the
reason I fiddled with CURLOPT_MAXCONNECTS. In case this approach is
bad/wrong, please don't hesitate to let me know if an alternative approach
exists.

> [...]
> What in the docs made you draw this conclusion? It is wrong, and if you can
> point out which lines in the docs that made you think this I could rephrase
> them.

The following sentence in the curl_easy_setopt() man page (paragraph on
CURLOPT_MAXCONNECTS):

The set amount will be the maximum
amount of simultaneous connections that libcurl may
cache between file transfers
                ^^^^^^^^^^^^^^^

(It's the phrase "file transfers" that made me believe that this option
only applied to FTP.)
 
> CURLOPT_MAXCONNECTS is the maximum number of "open" connections one single
> curl handle might use. No matter which protocol.

Thanks a lot for pointing this out (and thus clarifying the issue).

Greetings,

        Holger

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2002-09-13