From e6cdae7d2a827b3f0b16c031f7e1ca42a29e8ae4 Mon Sep 17 00:00:00 2001 From: theanarkh Date: Wed, 16 Oct 2024 23:51:26 +0800 Subject: [PATCH] lib: add UV_TCP_REUSEPORT for tcp --- doc/api/net.md | 8 +++++ lib/net.js | 22 ++++++++---- src/tcp_wrap.cc | 11 ++++-- test/common/net.js | 24 +++++++++++++ .../test-child-process-net-reuseport.js | 36 +++++++++++++++++++ test/parallel/test-cluster-net-reuseport.js | 36 +++++++++++++++++++ test/parallel/test-net-reuseport.js | 20 +++++++++++ 7 files changed, 148 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 9d7ad185549cb7..4fd15f547faccc 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.