aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2018-10-16 17:20:29 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2018-10-16 17:20:34 +0200
commit23419e4c4939fe557e37ec9d17c15c6eb73febc6 (patch)
treebb8f665ca3619e62becf3562d15f9bf015d5a9c6 /src/net.h
parent2468471e13987b1be377e1b33fe9c5cdb7a7a3e3 (diff)
parent032488e6e7b4c2d37f3f434d575d25806ddcb0b0 (diff)
downloadbitcoin-23419e4c4939fe557e37ec9d17c15c6eb73febc6.tar.xz
Merge #14335: net: refactor: cleanup ThreadSocketHandler
032488e6e7b4c2d37f3f434d575d25806ddcb0b0 Move SocketHandler logic to private method. (Patrick Strateman) 2af9cff11ad3ef27893b4b2009ddbfcb208554a9 Move InactivityCheck logic to private method. (Patrick Strateman) 7479b63d9109ccaf3708a92dc65dc24556576551 Move DisconnectNodes logic to private method. (Patrick Strateman) edb5350c32cdf7f8487777b5cc1a2ebfcdfc9e75 Move NotifyNumConnectionsChanged logic to private method. (Patrick Strateman) Pull request description: Working towards using poll() on unix like systems. A number of small changes designed to separate the actual socket handling from the rest of the logic in ThreadSocketHandler. This is a simpler version of #14147 Tree-SHA512: 72f35c8ef7649019dcbfe19537d8c9f7e3d0fc5854dc691a70c5573352230fc31c3f55565820c632e9b8cb3c55b878bed19e0ad9423100762197ac35967d8067
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/net.h b/src/net.h
index c43429c7f3..49360a7206 100644
--- a/src/net.h
+++ b/src/net.h
@@ -338,6 +338,10 @@ private:
void ThreadOpenConnections(std::vector<std::string> connect);
void ThreadMessageHandler();
void AcceptConnection(const ListenSocket& hListenSocket);
+ void DisconnectNodes();
+ void NotifyNumConnectionsChanged();
+ void InactivityCheck(CNode *pnode);
+ void SocketHandler();
void ThreadSocketHandler();
void ThreadDNSAddressSeed();
@@ -408,6 +412,7 @@ private:
std::list<CNode*> vNodesDisconnected;
mutable CCriticalSection cs_vNodes;
std::atomic<NodeId> nLastNodeId;
+ unsigned int nPrevNodeCount;
/** Services this instance offers */
ServiceFlags nLocalServices;