Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortheanarkh <theratliter@gmail.com>2022-07-09 15:00:18 +0300
committerGitHub <noreply@github.com>2022-07-09 15:00:18 +0300
commite3bf5e620bd465df4085df074d40127af3f4b4d8 (patch)
tree5f03e42fa212a79424ef00b8eda3f801d98f5d46 /doc/api/net.md
parent138704f821d5569f22c880fc9dff8a5ac58a0ed3 (diff)
net: add drop event for net server
PR-URL: https://github.com/nodejs/node/pull/43582 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Diffstat (limited to 'doc/api/net.md')
-rw-r--r--doc/api/net.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/api/net.md b/doc/api/net.md
index e0858e314f4..032278ea9f6 100644
--- a/doc/api/net.md
+++ b/doc/api/net.md
@@ -281,6 +281,23 @@ added: v0.1.90
Emitted when the server has been bound after calling [`server.listen()`][].
+### Event: `'drop'`
+
+<!-- YAML
+added: REPLACEME
+-->
+
+When the number of connections reaches the threshold of `server.maxConnections`,
+the server will drop new connections and emit `'drop'` event instead. If it is a
+TCP server, the argument is as follows, otherwise the argument is `undefined`.
+
+* `data` {Object} The argument passed to event listener.
+ * `localAddress` {string} Local address.
+ * `localPort` {number} Local port.
+ * `remoteAddress` {string} Remote address.
+ * `remotePort` {number} Remote port.
+ * `remoteFamily` {string} Remote IP family. `'IPv4'` or `'IPv6'`.
+
### `server.address()`
<!-- YAML