cURL / Mailing Lists / curl-library / Single Mail

curl-library

Adding A Speed limiting feature

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 29 Oct 2001 13:42:57 +0100 (MET)

(changed subject, and reply to two mails at once)

On Fri, 26 Oct 2001, Ben Greear wrote:

> I have some rate-limiting logic that I can donate if I can figure out
> where to place it...I'll think on it. I think it will need hooks into
> the library, but it might can be a type of callback function too...

If you do it with style, I figure it could/should be called from all custom
functions you specify. So that it gets called from write callbacks as well as
progress callbacks. The only thing I can imagine that will work for that kind
of function is adding delays when the transfer is faster than the desired
speed.

On Fri, 26 Oct 2001, SM wrote:

> The rate-limiting feature may be of interest to people using libcurl to
> build apps which perform downloads in the background.

Yes, but we must always ask ourselves if there's a good idea to add specific
features to the library that is already possible for an application to add
using the standard interfaces. In this case, I think we should go for this
latter solution. If the current interface is not good enough for it, we
should change that situation.

We could also provide easy accessible example source code that provides the
rate-limitation feature, so that people can implement that more easily.

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
Received on 2001-10-29