aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorCory Fields <cory-nospam-@coryfields.com>2016-04-19 00:01:19 -0400
committerCory Fields <cory-nospam-@coryfields.com>2016-09-08 12:24:06 -0400
commitbe9c796dc51c05cab0b84d2e66c928973c6e5ed6 (patch)
tree5ee7a73b713fcdc8501db979e867782b56e8ac7f /src/net.h
parent63cafa6329e1a0a1daf2d324931aca42ba1cbb19 (diff)
downloadbitcoin-be9c796dc51c05cab0b84d2e66c928973c6e5ed6.tar.xz
net: move SendBufferSize/ReceiveFloodSize to CConnman
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/net.h b/src/net.h
index e2d98a90d1..e5fbf65492 100644
--- a/src/net.h
+++ b/src/net.h
@@ -82,9 +82,6 @@ static const ServiceFlags REQUIRED_SERVICES = NODE_NETWORK;
// NOTE: When adjusting this, update rpcnet:setban's help ("24h")
static const unsigned int DEFAULT_MISBEHAVING_BANTIME = 60 * 60 * 24; // Default 24-hour ban
-unsigned int ReceiveFloodSize();
-unsigned int SendBufferSize();
-
typedef int NodeId;
struct AddedNodeInfo
@@ -170,6 +167,8 @@ public:
bool DisconnectNode(NodeId id);
bool DisconnectSubnet(const CSubNet& subnet);
+ unsigned int GetSendBufferSize() const;
+
void AddWhitelistedRange(const CSubNet &subnet);
//!set the max outbound target in bytes
@@ -235,6 +234,8 @@ private:
void DumpData();
void DumpBanlist();
+ unsigned int GetReceiveFloodSize() const;
+
// Network stats
void RecordBytesRecv(uint64_t bytes);
void RecordBytesSent(uint64_t bytes);
@@ -256,6 +257,9 @@ private:
std::vector<CSubNet> vWhitelistedRange;
CCriticalSection cs_vWhitelistedRange;
+ unsigned int nSendBufferMaxSize;
+ unsigned int nReceiveFloodSize;
+
std::vector<ListenSocket> vhListenSocket;
banmap_t setBanned;
CCriticalSection cs_setBanned;