diff options
| author | Lee *!* Clagett <code@leeclagett.com> | 2024-08-27 14:07:52 -0400 |
|---|---|---|
| committer | Lee *!* Clagett <code@leeclagett.com> | 2024-12-19 20:54:22 -0500 |
| commit | 0cd74568d6a7709c82cb12012ec952c8d00d6c96 (patch) | |
| tree | 0f291c5880a92b4ef903f12a92519ca860a099a1 /src/p2p/net_node.h | |
| parent | 58a1d54a4f90a235616ede3f8ebae2b8dca41589 (diff) | |
| download | monzero-core-0cd74568d6a7709c82cb12012ec952c8d00d6c96.tar.gz monzero-core-0cd74568d6a7709c82cb12012ec952c8d00d6c96.tar.xz monzero-core-0cd74568d6a7709c82cb12012ec952c8d00d6c96.zip | |
Cleanup TCP throttling code (performance) + move connection checks
Diffstat (limited to 'src/p2p/net_node.h')
| -rw-r--r-- | src/p2p/net_node.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/p2p/net_node.h b/src/p2p/net_node.h index 98d8ecfff..cbdeef7e3 100644 --- a/src/p2p/net_node.h +++ b/src/p2p/net_node.h @@ -125,7 +125,8 @@ namespace nodetool template<class t_payload_net_handler> class node_server: public epee::levin::levin_commands_handler<p2p_connection_context_t<typename t_payload_net_handler::connection_context> >, public i_p2p_endpoint<typename t_payload_net_handler::connection_context>, - public epee::net_utils::i_connection_filter + public epee::net_utils::i_connection_filter, + public epee::net_utils::i_connection_limit { struct by_conn_id{}; struct by_peer_id{}; @@ -351,7 +352,10 @@ namespace nodetool virtual bool add_host_fail(const epee::net_utils::network_address &address, unsigned int score = 1); //----------------- i_connection_filter -------------------------------------------------------- virtual bool is_remote_host_allowed(const epee::net_utils::network_address &address, time_t *t = NULL); + //----------------- i_connection_limit --------------------------------------------------------- + virtual bool is_host_limit(const epee::net_utils::network_address &address); //----------------------------------------------------------------------------------------------- + bool parse_peer_from_string(epee::net_utils::network_address& pe, const std::string& node_addr, uint16_t default_port = 0); bool handle_command_line( const boost::program_options::variables_map& vm |
