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:
authorJames M Snell <jasnell@gmail.com>2020-07-07 23:42:25 +0300
committerJames M Snell <jasnell@gmail.com>2020-07-09 17:14:07 +0300
commitcc89aac5f7d5443e0be9d037f067391ab144244e (patch)
tree4b62277fc22a034e6046ed4399509ad270556d64 /doc/api/quic.md
parentedc71ef008cb8ac68b86da3a3df8d826aae6a249 (diff)
quic: refactor/improve error handling for busy event
Also, change setServerBusy into a setter PR-URL: https://github.com/nodejs/node/pull/34247 Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'doc/api/quic.md')
-rw-r--r--doc/api/quic.md33
1 files changed, 16 insertions, 17 deletions
diff --git a/doc/api/quic.md b/doc/api/quic.md
index 6b0f9ae41bb..a847ac621aa 100644
--- a/doc/api/quic.md
+++ b/doc/api/quic.md
@@ -1330,8 +1330,8 @@ added: REPLACEME
-->
Emitted when the server busy state has been toggled using
-`quicSocket.setServerBusy()`. The callback is invoked with a single
-boolean argument indicating `true` if busy status is enabled,
+`quicSocket.serverBusy = true | false`. The callback is invoked with a
+single boolean argument indicating `true` if busy status is enabled,
`false` otherwise. This event is strictly informational.
```js
@@ -1346,8 +1346,8 @@ socket.on('busy', (busy) => {
console.log('Server is not busy');
});
-socket.setServerBusy(true);
-socket.setServerBusy(false);
+socket.serverBusy = true;
+socket.serverBusy = false;
```
This `'busy'` event may be emitted multiple times.
@@ -1874,6 +1874,18 @@ Set to `true` if the socket is not yet bound to the local UDP port.
added: REPLACEME
-->
+#### quicsocket.serverBusy
+<!-- YAML
+added: REPLACEME
+-->
+
+* Type: {boolean} When `true`, the `QuicSocket` will reject new connections.
+
+Setting `quicsocket.serverBusy` to `true` will tell the `QuicSocket`
+to reject all new incoming connection requests using the `SERVER_BUSY` QUIC
+error code. To begin receiving connections again, disable busy mode by setting
+`quicsocket.serverBusy = false`.
+
#### quicsocket.serverBusyCount
<!-- YAML
added: REPLACEME
@@ -1911,19 +1923,6 @@ by artificially dropping received or transmitted packets.
This method is *not* to be used in production applications.
-#### quicsocket.setServerBusy(\[on\])
-<!-- YAML
-added: REPLACEME
--->
-
-* `on` {boolean} When `true`, the `QuicSocket` will reject new connections.
- **Defaults**: `true`.
-
-Calling `setServerBusy()` or `setServerBusy(true)` will tell the `QuicSocket`
-to reject all new incoming connection requests using the `SERVER_BUSY` QUIC
-error code. To begin receiving connections again, disable busy mode by calling
-`setServerBusy(false)`.
-
#### quicsocket.statelessResetCount
<!-- YAML
added: REPLACEME