aboutsummaryrefslogtreecommitdiff
path: root/src/p2p/net_node.h
diff options
context:
space:
mode:
authorrfree2monero <rfreemonero@op.pl>2015-02-12 20:59:39 +0100
committerrfree2monero <rfreemonero@op.pl>2015-02-20 22:13:00 +0100
commit5ce4256e3d6ff2e1595750e3875865089e20a03b (patch)
tree6e26a3ac3285cb3c86c24caa7fa51033d2794085 /src/p2p/net_node.h
parent2014 network limit 1.0a +utils +toc -doc -drmonero (diff)
downloadmonero-5ce4256e3d6ff2e1595750e3875865089e20a03b.tar.xz
2014 network limit 1.1 +utils +toc -doc -drmonero
Update of the PR with network limits works very well for all speeds (but remember that low download speed can stop upload because we then slow down downloading of blockchain requests too) more debug options fixed pedantic warnings in our code should work again on Mac OS X and FreeBSD fixed warning about size_t tested on Debian, Ubuntu, Windows(testing now) TCP options and ToS (QoS) flag FIXED peer number limit FIXED some spikes in ingress/download FIXED problems when other up and down limit
Diffstat (limited to 'src/p2p/net_node.h')
-rw-r--r--src/p2p/net_node.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/p2p/net_node.h b/src/p2p/net_node.h
index 48737193e..ea7d5c383 100644
--- a/src/p2p/net_node.h
+++ b/src/p2p/net_node.h
@@ -86,7 +86,10 @@ namespace nodetool
m_no_igd(false),
m_hide_my_port(false),
m_network_id(std::move(network_id))
- {}
+ {
+ m_number_of_out_peers = 0;
+ m_save_graph = false;
+ }
static void init_options(boost::program_options::options_description& desc);
@@ -225,6 +228,12 @@ namespace nodetool
public:
config m_config; // TODO was private, add getters?
+ std::atomic<unsigned int> m_number_of_out_peers;
+ void set_save_graph(bool save_graph)
+ {
+ m_save_graph = save_graph;
+ epee::net_utils::connection_basic::set_save_graph(save_graph);
+ }
private:
std::string m_config_folder;
@@ -237,6 +246,7 @@ namespace nodetool
bool m_allow_local_ip;
bool m_hide_my_port;
bool m_no_igd;
+ std::atomic<bool> m_save_graph;
//critical_section m_connections_lock;
//connections_indexed_container m_connections;