aboutsummaryrefslogtreecommitdiff
path: root/src/p2p/net_node.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/p2p/net_node.h')
-rw-r--r--src/p2p/net_node.h31
1 files changed, 22 insertions, 9 deletions
diff --git a/src/p2p/net_node.h b/src/p2p/net_node.h
index 97fcd56c8..48737193e 100644
--- a/src/p2p/net_node.h
+++ b/src/p2p/net_node.h
@@ -80,14 +80,12 @@ namespace nodetool
public:
typedef t_payload_net_handler payload_net_handler;
- node_server(
- t_payload_net_handler& payload_handler
- , boost::uuids::uuid network_id
- )
- : m_payload_handler(payload_handler)
- , m_allow_local_ip(false)
- , m_hide_my_port(false)
- , m_network_id(std::move(network_id))
+ node_server(t_payload_net_handler& payload_handler, boost::uuids::uuid network_id)
+ :m_payload_handler(payload_handler),
+ m_allow_local_ip(false),
+ m_no_igd(false),
+ m_hide_my_port(false),
+ m_network_id(std::move(network_id))
{}
static void init_options(boost::program_options::options_description& desc);
@@ -111,6 +109,7 @@ namespace nodetool
virtual uint64_t get_connections_count();
size_t get_outgoing_connections_count();
peerlist_manager& get_peerlist_manager(){return m_peerlist;}
+ void delete_connections(size_t count);
private:
const std::vector<std::string> m_seed_nodes_list =
{ "seeds.moneroseeds.se"
@@ -118,6 +117,9 @@ namespace nodetool
, "seeds.moneroseeds.ch"
, "seeds.moneroseeds.li"
};
+
+ bool islimitup=false;
+ bool islimitdown=false;
typedef COMMAND_REQUEST_STAT_INFO_T<typename t_payload_net_handler::stat_info> COMMAND_REQUEST_STAT_INFO;
@@ -197,6 +199,13 @@ namespace nodetool
template <class Container>
bool parse_peers_and_add_to_container(const boost::program_options::variables_map& vm, const command_line::arg_descriptor<std::vector<std::string> > & arg, Container& container);
+ bool set_max_out_peers(const boost::program_options::variables_map& vm, int64_t max);
+ bool set_tos_flag(const boost::program_options::variables_map& vm, int limit);
+
+ bool set_rate_up_limit(const boost::program_options::variables_map& vm, int64_t limit);
+ bool set_rate_down_limit(const boost::program_options::variables_map& vm, int64_t limit);
+ bool set_rate_limit(const boost::program_options::variables_map& vm, uint64_t limit);
+
//debug functions
std::string print_connections_container();
@@ -214,7 +223,10 @@ namespace nodetool
END_KV_SERIALIZE_MAP()
};
- config m_config;
+ public:
+ config m_config; // TODO was private, add getters?
+
+ private:
std::string m_config_folder;
bool m_have_address;
@@ -224,6 +236,7 @@ namespace nodetool
uint32_t m_ip_address;
bool m_allow_local_ip;
bool m_hide_my_port;
+ bool m_no_igd;
//critical_section m_connections_lock;
//connections_indexed_container m_connections;