aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/core_rpc_server.h
diff options
context:
space:
mode:
authorErik de Castro Lopo <erikd@mega-nerd.com>2018-01-21 08:44:23 +1100
committerErik de Castro Lopo <erikd@mega-nerd.com>2018-01-29 11:14:02 +1100
commit32c0f908cd753f9319909e2f43d2b4657ebaf664 (patch)
tree85af316f61c3e28b995ff8b97be8424be4992d3f /src/rpc/core_rpc_server.h
parentRename delete_connections to delete_out_connections (diff)
downloadmonero-32c0f908cd753f9319909e2f43d2b4657ebaf664.tar.xz
Allow the number of incoming connections to be limited
It was already possible to limit outgoing connections. One might want to do this on home network connections with high bandwidth but low usage caps.
Diffstat (limited to 'src/rpc/core_rpc_server.h')
-rw-r--r--src/rpc/core_rpc_server.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rpc/core_rpc_server.h b/src/rpc/core_rpc_server.h
index 0c7028719..2b0d54bef 100644
--- a/src/rpc/core_rpc_server.h
+++ b/src/rpc/core_rpc_server.h
@@ -114,6 +114,7 @@ namespace cryptonote
MAP_URI_AUTO_JON2("/get_limit", on_get_limit, COMMAND_RPC_GET_LIMIT)
MAP_URI_AUTO_JON2_IF("/set_limit", on_set_limit, COMMAND_RPC_SET_LIMIT, !m_restricted)
MAP_URI_AUTO_JON2_IF("/out_peers", on_out_peers, COMMAND_RPC_OUT_PEERS, !m_restricted)
+ MAP_URI_AUTO_JON2_IF("/in_peers", on_in_peers, COMMAND_RPC_IN_PEERS, !m_restricted)
MAP_URI_AUTO_JON2_IF("/start_save_graph", on_start_save_graph, COMMAND_RPC_START_SAVE_GRAPH, !m_restricted)
MAP_URI_AUTO_JON2_IF("/stop_save_graph", on_stop_save_graph, COMMAND_RPC_STOP_SAVE_GRAPH, !m_restricted)
MAP_URI_AUTO_JON2("/get_outs", on_get_outs, COMMAND_RPC_GET_OUTPUTS)
@@ -183,6 +184,7 @@ namespace cryptonote
bool on_get_limit(const COMMAND_RPC_GET_LIMIT::request& req, COMMAND_RPC_GET_LIMIT::response& res);
bool on_set_limit(const COMMAND_RPC_SET_LIMIT::request& req, COMMAND_RPC_SET_LIMIT::response& res);
bool on_out_peers(const COMMAND_RPC_OUT_PEERS::request& req, COMMAND_RPC_OUT_PEERS::response& res);
+ bool on_in_peers(const COMMAND_RPC_IN_PEERS::request& req, COMMAND_RPC_IN_PEERS::response& res);
bool on_start_save_graph(const COMMAND_RPC_START_SAVE_GRAPH::request& req, COMMAND_RPC_START_SAVE_GRAPH::response& res);
bool on_stop_save_graph(const COMMAND_RPC_STOP_SAVE_GRAPH::request& req, COMMAND_RPC_STOP_SAVE_GRAPH::response& res);
bool on_update(const COMMAND_RPC_UPDATE::request& req, COMMAND_RPC_UPDATE::response& res);