From fad35447c4da4a1b588a1707a774a4e5fbbb3e20 Mon Sep 17 00:00:00 2001 From: Tim Perry Date: Thu, 9 Apr 2026 16:53:00 +0200 Subject: [PATCH] quic: add QuicEndpoint.listening & QuicStream.destroy() and tests Starting to explore and cover the existing implementation, this covers the basic endpoint & stream lifecycle and the exposed properties. Added endpoint.listening to match net.Server and round out endpoint properties, and stream.destroy() which is already called by quicSession.destroy() and documented, but didn't actually exist. Signed-off-by: Tim Perry --- doc/api/quic.md | 6 ++ lib/internal/quic/quic.js | 20 ++++ .../test-quic-session-stream-lifecycle.mjs | 98 +++++++++++++++++++ 3 files changed, 124 insertions(+) create mode 100644 test/parallel/test-quic-session-stream-lifecycle.mjs diff --git a/doc/api/quic.md b/doc/api/quic.md index 45aa2409fd1cc9..c5c197991cf923 100644 --- a/doc/api/quic.md +++ b/doc/api/quic.md @@ -204,6 +204,12 @@ added: v23.8.0 True if `endpoint.destroy()` has been called. Read only. +### `endpoint.listening` + +* Type: {boolean} + +True if the endpoint is actively listening for incoming connections. Read only. + ### `endpoint.setSNIContexts(entries[, options])`