From 2f192c4be07312cf616f757b5d2e5543063bf246 Mon Sep 17 00:00:00 2001 From: Shogun Date: Thu, 28 Apr 2022 12:05:55 +0200 Subject: 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 Reviewed-By: Luigi Pinca --- doc/api/http.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'doc/api/http.md') 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()` + + + +Closes all connections connected to this server. + +### `server.closeIdleConnections()` + + + +Closes all connections connected to this server which are not sending a request +or waiting for a response. + ### `server.headersTimeout`