cURL / Mailing Lists / curl-library / Single Mail

curl-library

Bandwidth/rate limitation

From: Evil Kosh <evil_kosh_uk_at_yahoo.co.uk>
Date: Mon, 09 Aug 2004 23:40:55 +0100

Hi guys,

I've come to require some way of limiting libcurl's bandwidth is has
access to, I originally thought I could implement some kind of timer,
then calculate the number of microseconds or bytes in each loop and
cutoff either when the timer goes over 1.0 seconds or the rate I'm
limiting to (and then could select for the remainder of that 1.0
seconds). But my problem, of course, is that libcurl can transfer more
than 1024bytes or 2048 bytes in ONE transfer, so it seems like it's out
of my hands, I need some way of telling libcurl to STOP when it gets to
a certain number of bytes.

I read on the mailing list that someone had figured out a way of doing
this, but then didnt go on to tell anymore about it. I was wondering if
anyone has a way of doing this and wouldnt mind telling me!

Thanks!

Christopher Thomas
Received on 2004-08-10