Skip to content

Turn off Nagle's algorithm on TCP connections - #94

Merged
jadamcrain merged 1 commit into
mainfrom
tcp-nodelay
Oct 15, 2026
Merged

jadamcrain merged 1 commit into
mainfrom
tcp-nodelay

Conversation

@jadamcrain

Copy link
Copy Markdown
Member

dnp3c's TCP connections left Nagle's algorithm on, so a small write sent right after another could wait for the first to be acknowledged before it went out. That shifts the timing the procedures check, e.g. a confirm followed at once by a request. DNP3 stacks turn Nagle off for this reason; the dnp3 library does by default.

Every TCP connection now sets TCP_NODELAY: it's set in TcpClientChannelFactory.connect, which both the channel factory and the driver's link status probe connect through. A new test checks a connection has it set, and fails without the change.

@jadamcrain
jadamcrain added this pull request to the merge queue Oct 15, 2026
Merged via the queue into main with commit 371a77b Oct 15, 2026
4 checks passed
@jadamcrain
jadamcrain deleted the tcp-nodelay branch October 15, 2026 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant