upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/net.h b/src/net.h
index 8b0245a..3c8c409 100644
--- a/src/net.h
+++ b/src/net.h
@@ -89,10 +89,9 @@ static const int BTF_HANDSHAKE_GRACE_SECS = 60;
89 89
90// A serialized object cannot be larger than MAX_SIZE, so no valid network 90// A serialized object cannot be larger than MAX_SIZE, so no valid network
91// message needs the old 256 MB header allowance. Keep the wire cap aligned with 91// message needs the old 256 MB header allowance. Keep the wire cap aligned with
92// what the deserializer can accept and bound how long one peer may sit on a 92// what the deserializer can accept. How long a peer may sit on a partial
93// partial payload after a complete header has arrived. 93// payload after a complete header has arrived is BTF_MSG_WAIT_MAX_SECS, below.
94static const unsigned int MAX_PROTOCOL_MESSAGE_SIZE = MAX_SIZE; 94static const unsigned int MAX_PROTOCOL_MESSAGE_SIZE = MAX_SIZE;
95static const int BTF_INCOMPLETE_MESSAGE_TIMEOUT_SECS = 2 * 60;
96 95
97// Ceiling on simultaneous connections. 96// Ceiling on simultaneous connections.
98// 97//
@@ -656,9 +655,6 @@ public:
656 int64 nLastSend; 655 int64 nLastSend;
657 int64 nLastRecv; 656 int64 nLastRecv;
658 int64 nLastSendEmpty; 657 int64 nLastSendEmpty;
659 int64 nIncompleteMessageStart;
660 unsigned int nIncompleteMessageSize;
661 string strIncompleteMessageCommand;
662 string strBtfAddr; 658 string strBtfAddr;
663 string strBtfMeeting; 659 string strBtfMeeting;
664 660
@@ -699,11 +695,13 @@ public:
699 nLastSend = 0; 695 nLastSend = 0;
700 nLastRecv = 0; 696 nLastRecv = 0;
701 nLastSendEmpty = GetTime(); 697 nLastSendEmpty = GetTime();
702 nIncompleteMessageStart = 0;
703 nIncompleteMessageSize = 0;
704 strIncompleteMessageCommand.clear();
705 strBtfAddr.clear(); 698 strBtfAddr.clear();
706 strBtfMeeting.clear(); 699 strBtfMeeting.clear();
700 // Not waiting on anything yet. Left indeterminate, the first partial
701 // message this peer sends is measured against whatever was in this
702 // memory, and ProcessMessages drops it as unreadable on first contact.
703 nMsgWaitSince = 0;
704 nMsgWaitSize = 0;
707 nStartingHeight = -1; 705 nStartingHeight = -1;
708 706
709 // Push a version message 707 // Push a version message