Server.prototype._listen2 is an undocumented alias for the internal setupListenHandle:
// lib/net.js
Server.prototype._listen2 = setupListenHandle; // legacy alias
The function was renamed from _listen2 to setupListenHandle in 0ea45707a4; the alias was kept for back-compat.
It's undocumented and nothing in core calls it except listenInCluster, which routes through server._listen2(...) only to preserve an undocumented monkeypatch point (per the inline comment).
Proposal:
- Deprecate the
_listen2 alias.
- After the deprecation cycle, remove it and call
setupListenHandle(...) directly in listenInCluster.
Server.prototype._listen2is an undocumented alias for the internalsetupListenHandle:The function was renamed from
_listen2tosetupListenHandlein0ea45707a4; the alias was kept for back-compat.It's undocumented and nothing in core calls it except
listenInCluster, which routes throughserver._listen2(...)only to preserve an undocumented monkeypatch point (per the inline comment).Proposal:
_listen2alias.setupListenHandle(...)directly inlistenInCluster.