From f697c55e380ebc1907a5fa479b56fda09f3ca74e Mon Sep 17 00:00:00 2001 From: Tim Perry <1526883+pimterry@users.noreply.github.com> Date: Mon, 13 Apr 2026 11:59:14 +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 PR-URL: https://github.com/nodejs/node/pull/62648 Reviewed-By: Aviv Keller Reviewed-By: James M Snell --- doc/api/quic.md | 6 ++ lib/internal/quic/quic.js | 29 +++++- .../test-quic-session-stream-lifecycle.mjs | 98 +++++++++++++++++++ 3 files changed, 131 insertions(+), 2 deletions(-) create mode 100644 test/parallel/test-quic-session-stream-lifecycle.mjs diff --git a/doc/api/quic.md b/doc/api/quic.md index e4a30bb9bbb..f058182e17d 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])`