aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/rpc_command_executor.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/daemon/rpc_command_executor.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/daemon/rpc_command_executor.cpp b/src/daemon/rpc_command_executor.cpp
index 8ef91600c..79b52711a 100644
--- a/src/daemon/rpc_command_executor.cpp
+++ b/src/daemon/rpc_command_executor.cpp
@@ -737,6 +737,15 @@ bool t_rpc_command_executor::print_status()
return true;
}
+bool t_rpc_command_executor::get_limit()
+{
+ int limit_down = epee::net_utils::connection_basic::get_rate_down_limit( );
+ int limit_up = epee::net_utils::connection_basic::get_rate_up_limit( );
+ std::cout << "limit-down is " << limit_down/1024 << " kB/s" << std::endl;
+ std::cout << "limit-up is " << limit_up/1024 << " kB/s" << std::endl;
+ return true;
+}
+
bool t_rpc_command_executor::set_limit(int limit)
{
epee::net_utils::connection_basic::set_rate_down_limit( limit );
@@ -746,6 +755,13 @@ bool t_rpc_command_executor::set_limit(int limit)
return true;
}
+bool t_rpc_command_executor::get_limit_up()
+{
+ int limit_up = epee::net_utils::connection_basic::get_rate_up_limit( );
+ std::cout << "limit-up is " << limit_up/1024 << " kB/s" << std::endl;
+ return true;
+}
+
bool t_rpc_command_executor::set_limit_up(int limit)
{
epee::net_utils::connection_basic::set_rate_up_limit( limit );
@@ -753,6 +769,13 @@ bool t_rpc_command_executor::set_limit_up(int limit)
return true;
}
+bool t_rpc_command_executor::get_limit_down()
+{
+ int limit_down = epee::net_utils::connection_basic::get_rate_down_limit( );
+ std::cout << "limit-down is " << limit_down/1024 << " kB/s" << std::endl;
+ return true;
+}
+
bool t_rpc_command_executor::set_limit_down(int limit)
{
epee::net_utils::connection_basic::set_rate_down_limit( limit );