From 129a5b1131e2da7fdfa1d23771fb2c738878f244 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Thu, 27 Aug 2026 16:32:43 +0200 Subject: [PATCH] doc: deprecate `Server.prototype._listen2` in `node:net` Signed-off-by: Antoine du Hamel --- doc/api/deprecations.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index 9b18c4ed486f..653155c239c3 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -4612,6 +4612,25 @@ throwing an error. This behavior is inconsistent with `hash.digest()` and may lead to subtle bugs. Calling `hmac.digest()` on a finalized `Hmac` instance will throw an error in a future version. + + +### DEP0208: `Server.prototype._listen2` + + + +Type: Documentation-only + +`net.Server.prototype._listen2` is an undocumented alias for an internal +function that sets up the listening handle. It is kept only so that code +replacing it keeps being called by [`server.listen()`][], and it will be +removed in a future version of Node.js. Use [`server.listen()`][] instead of +calling or overriding `_listen2`. + [DEP0142]: #dep0142-repl_builtinlibs [NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf [RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3 @@ -4740,6 +4759,7 @@ will throw an error in a future version. [`response.writableEnded`]: http.md#responsewritableended [`response.writableFinished`]: http.md#responsewritablefinished [`script.createCachedData()`]: vm.md#scriptcreatecacheddata +[`server.listen()`]: net.md#serverlisten [`setInterval()`]: timers.md#setintervalcallback-delay-args [`setTimeout()`]: timers.md#settimeoutcallback-delay-args [`socket.bufferSize`]: net.md#socketbuffersize