Skip to content

Commit

Permalink
doc: improve doc Http2Stream: FrameError, Timeout and Trailers
Browse files Browse the repository at this point in the history
Document arguments for the 'frameError', 'timeout' and 'trailers'
event.

PR-URL: #30373
Fixes: nodejs/help#877
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
dev-script authored and targos committed Jan 14, 2020
1 parent be97f71 commit a8df2e2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions doc/api/http2.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'`
<!-- YAML
added: v8.4.0
-->

* `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.
Expand Down

0 comments on commit a8df2e2

Please sign in to comment.