Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusing method description for Deno.TcpConn.setNoDelay #1053

Open
dbushell opened this issue Oct 21, 2024 · 0 comments
Open

Confusing method description for Deno.TcpConn.setNoDelay #1053

dbushell opened this issue Oct 21, 2024 · 0 comments
Assignees
Labels
discussion question Further information is requested

Comments

@dbushell
Copy link

The setNoDelay method for Deno.TcpConn states:

TcpConn.setNoDelay(noDelay?: boolean): void
Enable/disable the use of Nagle's algorithm.

This suggests calling setNoDelay(true) would enable the algorithm.

true = enable, false = disable — seems logical to me. However setting TCP_NODELAY=true on a TCP connection actually disables the algorithm from what I've researched.

Compare this to setKeepAlive:

TcpConn.setKeepAlive(keepAlive?: boolean): void
Enable/disable keep-alive functionality.

For this method true does mean "enable".

So if I'm not mistaken about setNoDelay the logic is reversed in the description. Either way I think more clarity would be useful.

@thisisjofrank thisisjofrank added question Further information is requested discussion labels Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants