diff options
author | James M Snell <jasnell@gmail.com> | 2020-05-28 13:51:10 -0700 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2020-06-01 08:38:00 -0700 |
commit | 41796ebd30744173cbe19201493349e7c8995082 (patch) | |
tree | ac309049969b115cd9bea8d71732cb4aa4b8efaa /doc | |
parent | a85ce885bddaf5fca00dc7d13eb3c5a99663e60f (diff) | |
download | node-new-41796ebd30744173cbe19201493349e7c8995082.tar.gz |
net: remove long deprecated server.connections property
The server.connections property was runtime deprecated in the
0.9 days. It was replaced with getConnections(). It is not
simply an alias for getConnections() because it fails to take
connections shared with forks into consideration. Let's not
keep it around forever and move it to end of life
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/33647
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/child_process.md | 5 | ||||
-rw-r--r-- | doc/api/deprecations.md | 10 | ||||
-rw-r--r-- | doc/api/net.md | 17 | ||||
-rw-r--r-- | doc/api/tls.md | 13 |
4 files changed, 8 insertions, 37 deletions
diff --git a/doc/api/child_process.md b/doc/api/child_process.md index 5657f2014a..2f18567737 100644 --- a/doc/api/child_process.md +++ b/doc/api/child_process.md @@ -1379,9 +1379,8 @@ process.on('message', (m, socket) => { ``` Once a socket has been passed to a child, the parent is no longer capable of -tracking when the socket is destroyed. To indicate this, the `.connections` -property becomes `null`. It is recommended not to use `.maxConnections` when -this occurs. +tracking when the socket is destroyed. It is recommended not to use +`.maxConnections` when this occurs. It is also recommended that any `'message'` handlers in the child process verify that `socket` exists, as the connection may have been closed during the diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index 5df161c1c6..1ee93d055b 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -481,6 +481,9 @@ This behavior has been removed. ### DEP0020: `Server.connections` <!-- YAML changes: + - version: REPLACEME + pr-url: https://github.com/nodejs/node/pull/33647 + description: Server.connections has been removed. - version: - v4.8.6 - v6.12.0 @@ -491,10 +494,10 @@ changes: description: Runtime deprecation. --> -Type: Runtime +Type: End-of-life -The [`Server.connections`][] property is deprecated. Please use the -[`Server.getConnections()`][] method instead. +The `Server.connections` property was deprecated in Node.js v0.9.7 and has +been removed. Please use the [`Server.getConnections()`][] method instead. <a id="DEP0021"></a> ### DEP0021: `Server.listenFD` @@ -2759,7 +2762,6 @@ const moduleParents = Object.values(require.cache) [`EventEmitter.listenerCount(emitter, eventName)`]: events.html#events_eventemitter_listenercount_emitter_eventname [`REPLServer.clearBufferedCommand()`]: repl.html#repl_replserver_clearbufferedcommand [`ReadStream.open()`]: fs.html#fs_class_fs_readstream -[`Server.connections`]: net.html#net_server_connections [`Server.getConnections()`]: net.html#net_server_getconnections_callback [`Server.listen({fd: <number>})`]: net.html#net_server_listen_handle_backlog_callback [`SlowBuffer`]: buffer.html#buffer_class_slowbuffer diff --git a/doc/api/net.md b/doc/api/net.md index 3e16d4a638..89b3de2f3b 100644 --- a/doc/api/net.md +++ b/doc/api/net.md @@ -156,22 +156,6 @@ The optional `callback` will be called once the `'close'` event occurs. Unlike that event, it will be called with an `Error` as its only argument if the server was not open when it was closed. -### `server.connections` -<!-- YAML -added: v0.2.0 -deprecated: v0.9.7 ---> - -> Stability: 0 - Deprecated: Use [`server.getConnections()`][] instead. - -* {integer|null} - -The number of concurrent connections on the server. - -This becomes `null` when sending a socket to a child with -[`child_process.fork()`][]. To poll forks and get current number of active -connections, use asynchronous [`server.getConnections()`][] instead. - ### `server.getConnections(callback)` <!-- YAML added: v0.9.7 @@ -1256,7 +1240,6 @@ Returns `true` if input is a version 6 IP address, otherwise returns `false`. [`new net.Socket(options)`]: #net_new_net_socket_options [`readable.setEncoding()`]: stream.html#stream_readable_setencoding_encoding [`server.close()`]: #net_server_close_callback -[`server.getConnections()`]: #net_server_getconnections_callback [`server.listen()`]: #net_server_listen [`server.listen(handle)`]: #net_server_listen_handle_backlog_callback [`server.listen(options)`]: #net_server_listen_options_callback diff --git a/doc/api/tls.md b/doc/api/tls.md index 7df3f0a511..bfebf5cc26 100644 --- a/doc/api/tls.md +++ b/doc/api/tls.md @@ -580,18 +580,6 @@ The `server.close()` method stops the server from accepting new connections. This function operates asynchronously. The `'close'` event will be emitted when the server has no more open connections. -### `server.connections` -<!-- YAML -added: v0.3.2 -deprecated: v0.9.7 ---> - -> Stability: 0 - Deprecated: Use [`server.getConnections()`][] instead. - -* {number} - -Returns the current number of concurrent connections on the server. - ### `server.getTicketKeys()` <!-- YAML added: v3.0.0 @@ -1963,7 +1951,6 @@ where `secureSocket` has the same API as `pair.cleartext`. [`net.Server`]: net.html#net_class_net_server [`net.Socket`]: net.html#net_class_net_socket [`server.addContext()`]: #tls_server_addcontext_hostname_context -[`server.getConnections()`]: net.html#net_server_getconnections_callback [`server.getTicketKeys()`]: #tls_server_getticketkeys [`server.listen()`]: net.html#net_server_listen [`server.setTicketKeys()`]: #tls_server_setticketkeys_keys |