node-unix-socket icon indicating copy to clipboard operation
node-unix-socket copied to clipboard

TCP_NODELAY

Open denyaalt opened this issue 1 year ago • 2 comments

Hi, Is it possible to add the TCP_NODELAY setting to SO_REUSEPORT to use them together? Thanks.

denyaalt avatar Mar 17 '24 10:03 denyaalt

If it's as simple as adding a socket flag, then yes. Moreover, this module already allows SO_REUSEPORT.

oyyd avatar Oct 15 '24 08:10 oyyd

Node.js allows setting noDeply option for net.Server. Therefore you can set the option with SO_REUSEPORT.

Example:

const fd = createReuseportFd(port, host);
const server = net.createServer({ noDelay: true })
server.listen(fd)

oyyd avatar Oct 17 '24 06:10 oyyd