I am developing an application which download files from internet; the files are mainly in ftp servers, I am using LWP::Simple and the getstore function to retrieve the files. But I would like to limit the speed of download, like in wget ...
have you seen something similar to the --limit-rate from wget implemented within LWP or LWP::Simple??
Thanks
If your main concerns are FTP servers, maybe look at Net::FTP::Throttle. You can set maximum rate in constructor.
There is no such option.
If you use a callback to grab the response body, you could intentionally slow down the callback (using sleep()) when necessary to provide the desired rate.
Of course, you could also avoid LWP entirely. For example, you could and shell out to call wget, curl or whatever. You could also use another module such as WWW::Curl.
Update: Added last paragraph.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With