net, refactor: Privatise CNode send queue#27407
Closed
dergoegge wants to merge 8 commits intobitcoin:masterfrom
Hidden character warning
The head ref may contain hidden characters: "2023-04-cnode-priv-send-\ud83d\udc0d"
Closed
net, refactor: Privatise CNode send queue#27407dergoegge wants to merge 8 commits intobitcoin:masterfrom
dergoegge wants to merge 8 commits intobitcoin:masterfrom
Conversation
There are no `CConnman` members used in `SocketSendData`, it should therefore be a method in `CNode` instead.
-BEGIN VERIFY SCRIPT-
ren() { sed -i "s:\<$1\>:$2:g" $(git grep -l "\<$1\>" ./src ./test); }
ren cs_vSend m_send_queue_mutex
ren vSendMsg m_send_queue
ren nSendBytes m_send_bytes
ren nSendOffset m_send_offset
ren nSendSize m_total_send_size
-END VERIFY SCRIPT-
Contributor
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
This was referenced Apr 3, 2023
11 tasks
This was referenced Apr 21, 2023
This was referenced Jun 26, 2023
This was referenced Jul 27, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The send queue members on
CNodeshould not be part of the public interface. This PR makes all of them private and creates a clear interface for the send queue.The interface after this PR consists of:
CNode::PushMessagefor appending a message onto the send queueCNode::SocketSendDatafor pushing as many messages from the send queue as possible onto the wireCNode::IsSendQueueEmptyfor checking if the send queue is emptyCNode::TestOnlyClearSendQueuea test-only utility for clearing the send queue)