curl-library
Re: Changing upload speed while a transfer is active
Date: Sun, 25 Jan 2009 13:29:06 +0100 (CET)
On Sun, 25 Jan 2009, Yoav Steinberg wrote:
> Looking at the Curl_pgrsUpdate() again, it seems there's a sliding window
> already implemented for calculating the current_speed. Currently
> current_speed is only used for checking the CURLOPT_LOW_SPEED_LIMIT
> parameter. But it seems to me it can be used for the
> CURLOPT_MAX_SEND/RECV_SPEED_LARGE parameters as well. This will result in a
> more accurate calculation for bandwidth limiting, make code simpler by
> reducing the speed calculation algorithms to one instead of the two
> different approaches taken today, and enable changing the bandwidth
> limitation while doing transfers. Does that sound right?
Yes, that sounds right. It makes perfect sense to re-use such existing code
and since we have that sliding calculation already done it should be fine to
use for this too.
I think the info should at least be based on several seconds worth of
transfer, if available.
-- / daniel.haxx.seReceived on 2009-01-25