cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Re: CURLOPT_MAX_RECV_SPEED_LARGE for the multi interface?

From: DarkOne The Masterthief <darkone_at_gbg.bg>
Date: Sun, 19 Aug 2007 18:20:30 +0300 (EEST)

On Sat, 18 Aug 2007, Daniel Stenberg wrote:

>> I'm using the multi interface with several downloads and I need to limit the
>> total amount of bandwidth they can use. Basically I need the
>> CURLOPT_MAX_RECV_SPEED_LARGE option but for the multi interface. Splitting
>> the bandwidth evenly between the downloads is not a solution, because if I
>> set the limit to, say, 150 KB/s with two simultanious downloads and one of
>> them can't go beyond 30 KB/s the other one should be able to utilize the
>> other 120 KB/s. How can I do this with cURL?

> The multi interface offers no such option/feature as of today, so you'd
> either have to make it done in your application,
> or you need to implement the feature in libcurl...

Yes, that's the impression I had when I read the documentation. But HOW do I implement it? I assume the solution would have to do with calling the curl_multi_perform function less often, but how do I know exactly HOW less often? Does curl_multi_perform perform a fixed amount of work each time it's called, does it perform a fixed amount of work for each transfer (not likely), or does it provide any other guarantee which would be useful in this situation?
Received on 2007-08-19