curl-library
PATCH: Make rate-limitation logic smoother.
From: Ben Greear <greearb_at_candelatech.com>
Date: Tue, 09 Mar 2010 13:01:57 -0800
Received on 2010-03-09
Date: Tue, 09 Mar 2010 13:01:57 -0800
The old rate-limitation logic paused for 1 second. The attached patch calculates
a better timeout based on requested speed and buffer size. I believe this will
give smoother rate limitation performance.
Please note that at very slow speeds, you need to use small-ish buffer sizes to get good smoothing.
This patch is on top of my previous patches. It fixes a few compiler warnings
as well.
Please let me know if it needs any improvements to make it more acceptable.
Thanks,
Ben
-- Ben Greear <greearb_at_candelatech.com> Candela Technologies Inc http://www.candelatech.com
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
- text/plain attachment: curl_transfer_ratelimit.patch