Skip to content

Commit 0022d75

Browse files
dev-scripttargos
authored andcommitted
doc: improve doc Http2Stream: FrameError, Timeout and Trailers
Document arguments for the 'frameError', 'timeout' and 'trailers' event. PR-URL: #30373 Fixes: nodejs/help#877 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent 5ae3a85 commit 0022d75

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

doc/api/http2.md

+9
Original file line numberDiff line numberDiff line change
@@ -970,6 +970,11 @@ an `Http2Stream`.
970970
added: v8.4.0
971971
-->
972972

973+
* `type` {integer} The frame type.
974+
* `code` {integer} The error code.
975+
* `id` {integer} The stream id (or `0` if the frame isn't associated with a
976+
stream).
977+
973978
The `'frameError'` event is emitted when an error occurs while attempting to
974979
send a frame. When invoked, the handler function will receive an integer
975980
argument identifying the frame type, and an integer argument identifying the
@@ -984,12 +989,16 @@ added: v8.4.0
984989
The `'timeout'` event is emitted after no activity is received for this
985990
`Http2Stream` within the number of milliseconds set using
986991
`http2stream.setTimeout()`.
992+
Its listener does not expect any arguments.
987993

988994
#### Event: 'trailers'
989995
<!-- YAML
990996
added: v8.4.0
991997
-->
992998

999+
* `headers` {HTTP/2 Headers Object} An object describing the headers
1000+
* `flags` {number} The associated numeric flags
1001+
9931002
The `'trailers'` event is emitted when a block of headers associated with
9941003
trailing header fields is received. The listener callback is passed the
9951004
[HTTP/2 Headers Object][] and flags associated with the headers.

0 commit comments

Comments
 (0)