cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: CURLMOPT_MAXCONNECTS does not seem to work

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 31 Jan 2008 20:16:28 +0100 (CET)

On Thu, 31 Jan 2008, zaheer ahmad wrote:

No need for cross-posting this to the users list. I removed that recipient.

> iam using curl as backend on embedded system. we have an application which
> creates multiple handles for each request and adds it to a global curl
> multihandle.
>
> we observe that this cause many tcp connections to be created (one for each
> curl_multi_add_handle). we are trying to restrict it through
> CURLMOPT_MAXCONNECTS however it does not seem to have an effect.

Can you elaborate on this? There will of course be at least one connection for
each easy handle you use.

> Also, is restricting the number of handles the right approach to improve
> system response for other events.

Not really. Unless you use a fairly large number of file descriptors, the
amount have very little significance. And if you are, the CURLMOPT_MAXCONNECTS
won't be what limits the amount anyway but simply how many easy handles you
have added to the multi handle to get used simultaneously.

Not that I completely understand what "system response for other events"
you're talking about.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2008-01-31