diff options
author | theanarkh <theratliter@gmail.com> | 2022-07-09 15:00:18 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-09 15:00:18 +0300 |
commit | e3bf5e620bd465df4085df074d40127af3f4b4d8 (patch) | |
tree | 5f03e42fa212a79424ef00b8eda3f801d98f5d46 /doc/api/net.md | |
parent | 138704f821d5569f22c880fc9dff8a5ac58a0ed3 (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.md | 17 |
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 |