Skip to content

Commit

Permalink
doc: add arguments for stream event of Http2Server and Http2SecureServer
Browse files Browse the repository at this point in the history
PR-URL: #37892
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
Ayase-252 authored and targos committed Apr 29, 2021
1 parent 2d59273 commit f08650c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions doc/api/http2.md
Original file line number Diff line number Diff line change
Expand Up @@ -1822,9 +1822,17 @@ an `Http2Session` object associated with the `Http2Server`.
added: v8.4.0
-->

* `stream` {Http2Stream} A reference to the stream
* `headers` {HTTP/2 Headers Object} An object describing the headers
* `flags` {number} The associated numeric flags
* `rawHeaders` {Array} An array containing the raw header names followed by
their respective values.

The `'stream'` event is emitted when a `'stream'` event has been emitted by
an `Http2Session` associated with the server.

See also [`Http2Session`'s `'stream'` event][].

```js
const http2 = require('http2');
const {
Expand Down Expand Up @@ -2010,9 +2018,17 @@ an `Http2Session` object associated with the `Http2SecureServer`.
added: v8.4.0
-->

* `stream` {Http2Stream} A reference to the stream
* `headers` {HTTP/2 Headers Object} An object describing the headers
* `flags` {number} The associated numeric flags
* `rawHeaders` {Array} An array containing the raw header names followed by
their respective values.

The `'stream'` event is emitted when a `'stream'` event has been emitted by
an `Http2Session` associated with the server.

See also [`Http2Session`'s `'stream'` event][].

```js
const http2 = require('http2');
const {
Expand Down Expand Up @@ -3845,6 +3861,7 @@ you need to implement any fall-back behaviour yourself.
[`Http2ServerRequest`]: #http2_class_http2_http2serverrequest
[`Http2ServerResponse`]: #http2_class_http2_http2serverresponse
[`Http2Session` and Sockets]: #http2_http2session_and_sockets
[`Http2Session`'s `'stream'` event]: #http2_event_stream
[`Http2Stream`]: #http2_class_http2stream
[`ServerHttp2Stream`]: #http2_class_serverhttp2stream
[`TypeError`]: errors.md#errors_class_typeerror
Expand Down

0 comments on commit f08650c

Please sign in to comment.