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
path: root/doc
diff options
context:
space:
mode:
authorShogun <paolo@cowtech.it>2022-04-28 13:05:55 +0300
committerShogun <paolo@cowtech.it>2022-05-03 15:04:07 +0300
commitf714a0fa6e5630aa959ee4bda10345ba81161fc5 (patch)
treec6acfe431b006553d9e55acae8e380c6cd5be271 /doc
parent6ebe5a4ff0f2f196eb8502c067da4f2cca3d241a (diff)
http: added connection closing methods
Fixes: https://github.com/nodejs/node/issues/41578 PR-URL: https://github.com/nodejs/node/pull/42812 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/api/http.md17
-rw-r--r--doc/api/https.md22
2 files changed, 37 insertions, 2 deletions
diff --git a/doc/api/http.md b/doc/api/http.md
index ca845b394b8..c0ccc2b5a68 100644
--- a/doc/api/http.md
+++ b/doc/api/http.md
@@ -1455,6 +1455,23 @@ added: v0.1.90
Stops the server from accepting new connections. See [`net.Server.close()`][].
+### `server.closeAllConnections()`
+
+<!-- YAML
+added: REPLACEME
+-->
+
+Closes all connections connected to this server.
+
+### `server.closeIdleConnections()`
+
+<!-- YAML
+added: REPLACEME
+-->
+
+Closes all connections connected to this server which are not sending a request
+or waiting for a response.
+
### `server.headersTimeout`
<!-- YAML
diff --git a/doc/api/https.md b/doc/api/https.md
index c022bc7ee30..67f667c1ed8 100644
--- a/doc/api/https.md
+++ b/doc/api/https.md
@@ -133,7 +133,23 @@ added: v0.1.90
* `callback` {Function}
* Returns: {https.Server}
-See [`server.close()`][`http.close()`] from the HTTP module for details.
+See [`http.Server.close()`][].
+
+### `server.closeAllConnections()`
+
+<!-- YAML
+added: REPLACEME
+-->
+
+See [`http.Server.closeAllConnections()`][].
+
+### `server.closeIdleConnections()`
+
+<!-- YAML
+added: REPLACEME
+-->
+
+See [`http.Server.closeIdleConnections()`][].
### `server.headersTimeout`
@@ -529,8 +545,10 @@ headers: max-age=0; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; p
[`http.Server#requestTimeout`]: http.md#serverrequesttimeout
[`http.Server#setTimeout()`]: http.md#serversettimeoutmsecs-callback
[`http.Server#timeout`]: http.md#servertimeout
+[`http.Server.close()`]: http.md#serverclosecallback
+[`http.Server.closeAllConnections()`]: http.md#servercloseallconnections
+[`http.Server.closeIdleConnections()`]: http.md#servercloseidleconnections
[`http.Server`]: http.md#class-httpserver
-[`http.close()`]: http.md#serverclosecallback
[`http.createServer()`]: http.md#httpcreateserveroptions-requestlistener
[`http.get()`]: http.md#httpgetoptions-callback
[`http.request()`]: http.md#httprequestoptions-callback