diff options
author | Cory Fields <cory-nospam-@coryfields.com> | 2016-12-31 02:05:32 -0500 |
---|---|---|
committer | Cory Fields <cory-nospam-@coryfields.com> | 2017-01-12 23:05:59 -0500 |
commit | 991955ee81034dc3fbc1c2a8e60c04fc9e0b538c (patch) | |
tree | a624868494e3c50786df85c75b1225b6e8e8eee2 /src/net.h | |
parent | c6e8a9bcffe4c0f236e27c663f08785d1a0a783b (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.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; |