From 4fa773964b0f2739d7b775d6eec61cf174aee81a Mon Sep 17 00:00:00 2001 From: HinataKah0 <128208841+HinataKah0@users.noreply.github.com> Date: Mon, 24 Apr 2023 13:35:38 +0800 Subject: [PATCH] http: add highWaterMark opt in http.createServer Add highWaterMark option when creating a new HTTP server. This option will override the default (readable|writable) highWaterMark values on sockets created. Fixes: https://github.com/nodejs/node/issues/46606 PR-URL: https://github.com/nodejs/node/pull/47405 Reviewed-By: Robert Nagy Reviewed-By: Paolo Insogna Reviewed-By: Debadree Chatterjee --- doc/api/http.md | 8 ++++ doc/api/net.md | 7 +++ lib/_http_outgoing.js | 5 +- lib/_http_server.js | 9 ++-- lib/http.js | 1 + lib/net.js | 13 +++++ .../test-http-server-options-highwatermark.js | 47 +++++++++++++++++++ 7 files changed, 84 insertions(+), 6 deletions(-) create mode 100644 test/parallel/test-http-server-options-highwatermark.js diff --git a/doc/api/http.md b/doc/api/http.md index 3b74f736d30bdf..30ce1ae3f43671 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -3192,6 +3192,9 @@ Found'`.