Skip to content

Pause/Resume Reading from Socket#264

Open
dometec wants to merge 1 commit intovert-x3:masterfrom
dometec:master
Open

Pause/Resume Reading from Socket#264
dometec wants to merge 1 commit intovert-x3:masterfrom
dometec:master

Conversation

@dometec
Copy link
Contributor

@dometec dometec commented Feb 17, 2026

PR #262 into master branch

Motivation:
The ability to pause reading from the socket to avoid being overwhelmed by QoS 0 messages during traffic spikes.
When reading is paused, incoming data accumulates in the TCP receive buffer. As the buffer fills up, the TCP stack advertises a reduced window size (eventually a zero window) to the broker, applying backpressure at the TCP level.
At that point, outgoing data may accumulate in the broker’s socket send buffer until its limits are reached. Depending on the broker’s implementation and configuration, QoS 0 messages that cannot be written may be buffered or dropped.

Changes:
Implement new pause/resume methods that delegate to the corresponding NetSocketInternal methods.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant