From 7bc3e16da1eac8f207affa87fbfb1b6955b574c5 Mon Sep 17 00:00:00 2001 From: theanarkh Date: Mon, 21 Oct 2024 21:10:53 +0800 Subject: [PATCH] net: add UV_TCP_REUSEPORT for tcp PR-URL: https://github.com/nodejs/node/pull/55408 Refs: https://github.com/libuv/libuv/pull/4407 Reviewed-By: Matteo Collina Reviewed-By: Paolo Insogna Reviewed-By: Luigi Pinca --- doc/api/net.md | 8 ++++ lib/net.js | 22 +++++++--- src/tcp_wrap.cc | 10 +++-- test/common/net.js | 23 +++++++++++ .../test-child-process-net-reuseport.js | 35 ++++++++++++++++ test/parallel/test-cluster-net-reuseport.js | 41 +++++++++++++++++++ test/parallel/test-net-reuseport.js | 26 ++++++++++++ 7 files changed, 156 insertions(+), 9 deletions(-) create mode 100644 test/common/net.js create mode 100644 test/parallel/test-child-process-net-reuseport.js create mode 100644 test/parallel/test-cluster-net-reuseport.js create mode 100644 test/parallel/test-net-reuseport.js diff --git a/doc/api/net.md b/doc/api/net.md index 272705e80ed..0d78505cc78 100644 --- a/doc/api/net.md +++ b/doc/api/net.md @@ -471,6 +471,9 @@ Listening on a file descriptor is not supported on Windows.