cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Limiting the number of active connections/transfers.

From: Vladimir Grishchenko <vladgri_at_hotmail.com>
Date: Mon, 4 Apr 2011 15:23:25 -0700

> >
> > As for multi vs. easy, there is a chance I might need to use the latter as
> > well but not both at the same time. Sounds like for the easy interface, to
> > achieve the same effect, I need to make sure that the total # of configured
> > CURLOPT_MAXCONNECTS across all alive easy handles should not be more than N?
> > For example, having at most 6 active easy handles with CURLOPT_MAXCONNECTS
> > set to 2 on each of them will guarantee there is never more than 6 open
> > connections at any given time?
>
> For the easy interface, the CURLOPT_MAXCONNECTS number goes for each
> individual easy handle.
>
> Since you can only do one connection at a time with the easy interface, the
> logic is easier: CURLOPT_MAXCONNECTS sets the maximum amount of connections
> that will be kept in the pool (and it will always be at least one).
>
> --
>
> / daniel.haxx.se
> -------------------------------------------------------------------

I failed to mention there will be multi-threading, one thread per e-handle,
hence my example with several handles.
                                               
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-04-05