cURL / Mailing Lists / curl-library / Single Mail

curl-library

Issue throttling transfer speed

From: Peter Ashford <peter_at_clocktower-games.com>
Date: Mon, 6 Oct 2008 17:28:54 +1400

Hi
We have an issue using libcurl 7.18.0, zlib 1.2.3. We have an HTTP download
that we want to change the transfer speed for in response to external
conditions. We use the curl_easy_setopt function inside the progress
callback with CURLOPT_MAX_RECV_SPEED_LARGE to change the maximum download
speed. We want to be able to change the speed back and forth between 0
(unlimited) and 25600.

Now, changing the speed from bounded to unbounded works, but when we go the
other way (i.e.: throttle back the connection) then the transfer hangs and
then after a few minutes timeout, curl_easy_perform returns the error
"Transferred a partial file".

Does anyone have any idea what we're doing wrong? We've used the VERBOSE
options and printed out the error string that gets set, but we're not
getting anywhere.

Thanks!

Peter.

-- 
I've spent my time in the C++ trenches. C isn't a terribly good language,
but when you shoot yourself in the foot it's usually a clean wound.
Received on 2008-10-06