doc: document new TCP_KEEPCNT and TCP_KEEPINTVL defaults

📗 API Reference Docs Problem

  • Version: v14.0.0 and above, v12.17.0 and above.
  • Platform: All
  • Subsystem: net

Location

Net, socket documentation.

Affected URL(s):

Description

PR #32204 introduced new defaults for the TCP keep-alive socket options (see deps/uv/src/unix/tcp.c):

  • TCP_KEEPCNT now defaults to 10 on all platforms
  • TCP_KEEPINTVL now defaults to 1 on all platforms

Previously, TCP_KEEPCNT and TCP_KEEPINTVL were not set explicitly and OS-default values were used.

This affects Node.js releases v14.0.0 and above, v12.17.0 and above (but not v10).

The change is not mentioned in the documentation or the release notes.

Would be great to add this information either alongside socket.setKeepAlive([enable][, initialDelay]) or as a separate section under net.Socket documentation.


  • I would like to work on this issue and submit a pull request.