From e0811cd8cc1dd0508b05437c1a5e1cee7f196405 Mon Sep 17 00:00:00 2001 From: dev-313 Date: Tue, 12 Nov 2019 16:35:53 +0530 Subject: [PATCH] doc: improve doc Http2Stream: FrameError, Timeout and Trailers Document arguments for the 'frameError', 'timeout' and 'trailers' event. PR-URL: https://github.com/nodejs/node/pull/30373 Fixes: https://github.com/nodejs/help/issues/877 Reviewed-By: James M Snell Reviewed-By: Gireesh Punathil Reviewed-By: Ruben Bridgewater --- doc/api/http2.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/api/http2.md b/doc/api/http2.md index 1e9afc438e4581..2c4a91dda080d4 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -970,6 +970,11 @@ an `Http2Stream`. added: v8.4.0 --> +* `type` {integer} The frame type. +* `code` {integer} The error code. +* `id` {integer} The stream id (or `0` if the frame isn't associated with a + stream). + The `'frameError'` event is emitted when an error occurs while attempting to send a frame. When invoked, the handler function will receive an integer argument identifying the frame type, and an integer argument identifying the @@ -984,12 +989,16 @@ added: v8.4.0 The `'timeout'` event is emitted after no activity is received for this `Http2Stream` within the number of milliseconds set using `http2stream.setTimeout()`. +Its listener does not expect any arguments. #### Event: `'trailers'` +* `headers` {HTTP/2 Headers Object} An object describing the headers +* `flags` {number} The associated numeric flags + The `'trailers'` event is emitted when a block of headers associated with trailing header fields is received. The listener callback is passed the [HTTP/2 Headers Object][] and flags associated with the headers.