aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorCory Fields <cory-nospam-@coryfields.com>2016-12-31 02:05:32 -0500
committerCory Fields <cory-nospam-@coryfields.com>2017-01-12 23:05:59 -0500
commit991955ee81034dc3fbc1c2a8e60c04fc9e0b538c (patch)
treea624868494e3c50786df85c75b1225b6e8e8eee2 /src/net.h
parentc6e8a9bcffe4c0f236e27c663f08785d1a0a783b (diff)
net: add a flag to indicate when a node's send buffer is full
Similar to the recv flag, but this one indicates whether or not the net's send buffer is full. The socket handler checks the send queue when a new message is added and pauses if necessary, and possibly unpauses after each message is drained from its buffer.
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/net.h b/src/net.h
index 0eb430a8bf..db73be477f 100644
--- a/src/net.h
+++ b/src/net.h
@@ -358,6 +358,7 @@ private:
NodeId GetNewNodeId();
+ size_t SocketSendData(CNode *pnode);
//!check is the banlist has unwritten changes
bool BannedSetIsDirty();
//!set the "dirty" flag for the banlist
@@ -444,7 +445,6 @@ void Discover(boost::thread_group& threadGroup);
void MapPort(bool fUseUPnP);
unsigned short GetListenPort();
bool BindListenPort(const CService &bindAddr, std::string& strError, bool fWhitelisted = false);
-size_t SocketSendData(CNode *pnode);
struct CombinerAll
{
@@ -652,6 +652,7 @@ public:
const uint64_t nKeyedNetGroup;
std::atomic_bool fPauseRecv;
+ std::atomic_bool fPauseSend;
protected:
mapMsgCmdSize mapSendBytesPerMsgCmd;