Modify throttle status bar mod to be able to display multiple values (See #6)

This commit is contained in:
chros
2019-07-27 11:19:46 +01:00
parent b697a4608b
commit f22475d1bf
6 changed files with 160 additions and 10 deletions
+3
View File
@@ -42,6 +42,7 @@
#include <torrent/utils/log_buffer.h>
#include <torrent/connection_manager.h>
#include <torrent/object.h>
#include "download_list.h"
#include "poll_manager.h"
@@ -91,6 +92,8 @@ public:
ThrottleMap& throttles() { return m_throttles; }
torrent::ThrottlePair get_throttle(const std::string& name);
int64_t retrieve_throttle_value(const torrent::Object::string_type& name, bool rate, bool up);
// Use custom throttle for the given range of IP addresses.
void set_address_throttle(uint32_t begin, uint32_t end, torrent::ThrottlePair throttles);
torrent::ThrottlePair get_address_throttle(const sockaddr* addr);