Skip to content

Confusing method description for Deno.TcpConn.setNoDelay #1053

Open
@dbushell

Description

@dbushell

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions