Limiting rate on downloading a file http?

Hi all,

I’m looking for a solution for downloading a file from http and limiting
the download rate. I do not want to use wget. I hear you can atleast
get a ball-park rate-limit out there by using open-uri and sleep. Any
other suggestion, or gems/etc. that can help me?

Thanks.

On [Fri, 22.02.2008 03:12], Kyle H. wrote:

Hi all,

I’m looking for a solution for downloading a file from http and limiting
the download rate. I do not want to use wget. I hear you can atleast
get a ball-park rate-limit out there by using open-uri and sleep. Any
other suggestion, or gems/etc. that can help me?

Thanks.

Posted via http://www.ruby-forum.com/.

Well, if you are using Linux, you can have a look at the program
trickle,
an user-space bandwidth shaper/limiter.

But that would be more like… “trickle $settings ruby file.rb”, so not
implemented inside your script,
and as said before, linux only. (Dont know about Mac though)