cURL / Mailing Lists / curl-library / Single Mail

curl-library

Limit speed for multiple downloads

From: Patrick K. <cooldie_1_at_hotmail.com>
Date: Thu, 28 Jan 2010 21:14:36 +0100

Hey,

I would like to limit the speed for multiple downloads. I checked out the easy interface and found a way to limit it for just one download. Of course, that is not enough because I need this option for more than one download. Unfortunately the multi interface does not provide a way, too.

I tried google and found about some people who encountered the same problem but I can not get my own solution for this working. Could someone provide a little sample code? I simply do not get the idea to solve the problem myself. There must be something about a timeout, but would not it also block the other downloads? If it really would then it is not a suitable solution. The other downloads must go on and the speed should just be adjusted to get the most speed.

If the limit i.e. is 200kb and I am downloading 2 files:
File 1 is downloading at 100kb/s
File 2 is downloading at 100kb/s

Thats alright. The speed is used perfectly. But suddenly File 1 is losing speed and is downloading at 20kb/s. Now the speed for File 2 should be adjusted to 180kb/s.

If I had set the limit for every download to 100kb/s then File 2 would not be able to reach 180kb/s and would be limited to a speed that could be much faster.

I really would appreciate your help.

Thanks
Patrick
                                               
_________________________________________________________________
http://redirect.gimas.net/?n=M1001xHM2
Hotmail macht’s dir leicht: Versende vorgeschriebene Neujahrsgrüße

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-01-28