curl-users
Patch ideas for interactive throttling
Date: Mon, 29 Feb 2016 11:39:26 +0100
Hi,
I'm thinking of patching curl to add the following feature I need:
Interactively throttle the download speed (instead of stop Ctrl-C and
resume with -c and --limit-rate )
I'm investigating several ideas:
1) Sending UNIX signals: USR1 (and USR2) to lower (resp. raise) speed
limit by 10k increments. If no limit has been set then use the current
average speed as reference.
2) Continuously read a file or a named pipe, given at startup on
command line, to get instruction from, i.e. the " --limit-rate 400k "
to obey to.
3) Register to DBUS as a bulk bandwidth consumer and wait for some
message to update speed limit. Some other application will take care
of managing priorities and global download rate (for all registered
downloaders).
4) Add an option to continuously read stdin for on the fly options
that would supersede the command line ones (when applicable).
Any other ideas ?
As several people already asked for this feature, I'm also wondering
if it could be accepted in the main code, but...
The 1) require exclusive use of the only two user signals, and it's
not cross platform
The 2) locks bad and may draw shame on the patch author :)
The 3) could be powerful but the DBUS dependency may not please most people
The 4) is not even a good idea that seems practical, is it ?
Thanks for reading, and thanks for any comment.
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-users
FAQ: https://curl.haxx.se/docs/faq.html
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-02-29