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/api
diff options
context:
space:
mode:
authorShogun <paolo@cowtech.it>2022-04-28 13:05:55 +0300
committerRafaelGSS <rafael.nunu@hotmail.com>2022-05-10 15:13:17 +0300
commit2f192c4be07312cf616f757b5d2e5543063bf246 (patch)
tree06e61b823fc66527e7538e0470776494857737f4 /doc/api
parent3ab30860088727668ab3950d284e6e8937d23ed8 (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/api')
-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 543a25dfdf8..fd15d16074a 100644
--- a/doc/api/http.md
+++ b/doc/api/http.md
@@ -1453,6 +1453,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