diff options
| author | Marq Schneider <queueRAM@gmail.com> | 2010-08-11 22:37:51 -0500 |
|---|---|---|
| committer | Marq Schneider <queueRAM@gmail.com> | 2010-08-11 22:37:51 -0500 |
| commit | 64060294ab58dfd07a95a24a1500602421748da9 (patch) | |
| tree | ec61cfce0fd1f4a7a8fa7c00168e38a1bd481ed3 /misc/btpd_if.c | |
| parent | 033b776ab28e616fd9217087a50252297394a4ca (diff) | |
| download | btpd-64060294ab58dfd07a95a24a1500602421748da9.tar.gz btpd-64060294ab58dfd07a95a24a1500602421748da9.zip | |
Allow changing the upload and download rates at runtime.
This adds a 'rate' command to modify the up and download rates on the fly. Closes GH-10
Diffstat (limited to 'misc/btpd_if.c')
| -rw-r--r-- | misc/btpd_if.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/misc/btpd_if.c b/misc/btpd_if.c index b661b21..e208d64 100644 --- a/misc/btpd_if.c +++ b/misc/btpd_if.c @@ -297,6 +297,14 @@ btpd_del(struct ipc *ipc, struct ipc_torrent *tp) } enum ipc_err +btpd_rate(struct ipc *ipc, unsigned up, unsigned down) +{ + struct iobuf iob = iobuf_init(32); + iobuf_print(&iob, "l4:ratei%iei%iee", up, down); + return ipc_buf_req_code(ipc, &iob); +} + +enum ipc_err btpd_start(struct ipc *ipc, struct ipc_torrent *tp) { return simple_treq(ipc, "start", tp); |