cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Misc. enhancements

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 4 Aug 2003 00:29:54 +0200 (CEST)

On Sat, 2 Aug 2003, Daniel Noguerol wrote:

[ speed throttle ]

> > I think I rather keep this client-side.
>
> I have tried both approaches (callback and in the library itself) and the
> problem I see with sleeping in the read/write callbacks is that if you look
> at bandwidth utilization, you see some nasty spikes... full bandwidth for a
> brief moment, than nothing, full bandwidth, nothing, etc. If you actually do
> the speed check at the time of reading and only read the appropriate number
> of bytes from the socket, you get a nice, smooth bandwidth graph. For my
> purposes, I am going to put it into libCURL itself and add a parameter to
> set the upper bandwidth limit. If you want to keep it client side as far as
> the main branch goes, I understand :)

Well, I'll surely be interested in seeing your solution, and I do reserve
myself the right to change my mind! ;-)

-- 
 Daniel Stenberg -- curl: been grokking URLs since 1998
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
Received on 2003-08-04