diff --git a/doc/api/quic.md b/doc/api/quic.md index 42a8b756909d1e..3667a05b394956 100644 --- a/doc/api/quic.md +++ b/doc/api/quic.md @@ -274,7 +274,7 @@ added: REPLACEME * `maxStatelessResetsPerHost` {number} The maximum number of stateless resets that the `QuicSocket` is permitted to send per remote host. Default: `10`. - * `qlog` {boolean} Whether to emit ['qlog'][] events for incoming sessions. + * `qlog` {boolean} Whether to enable ['qlog'][] for incoming sessions. (For outgoing client sessions, set `client.qlog`.) Default: `false`. * `retryTokenTimeout` {number} The maximum number of *seconds* for retry token validation. Default: `10` seconds. @@ -633,20 +633,6 @@ The callback will be invoked with three arguments: The `'pathValidation'` event will be emitted multiple times. -#### Event: `'qlog'` - - -* `jsonChunk` {string} A JSON fragment. - -Emitted if the `qlog: true` option was passed to `quicsocket.connect()` or -`net.createQuicSocket()` functions. - -The argument is a JSON fragment according to the [qlog standard][]. - -The `'qlog'` event will be emitted multiple times. - #### Event: `'secure'` + +* Type: {stream.Readable} + +If `qlog` support is enabled for `QuicSession`, the `quicsession.qlog` property +provides a [`stream.Readable`][] that may be used to access the `qlog` event +data according to the [qlog standard][]. For client `QuicSessions`, the +`quicsession.qlog` property will be `undefined` untilt the `'qlog'` event +is emitted. + #### quicsession.remoteAddress + +The `'qlog'` event is emitted when the `QuicClientSession` is ready to begin +providing `qlog` event data. The callback is invoked with a single argument: + +* `qlog` {stream.Readable} A [`stream.Readable`][] that is also available using + the `quicsession.qlog` property. + #### Event: `'usePreferredAddress'`