0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00

doc: add parameters for Http2Session:stream event

Add parameters for the callback for the Http2Session:stream event
inline with the pattern in the rest of the documentation.

Refs: https://github.com/nodejs/help/issues/877#issuecomment-381253464

PR-URL: https://github.com/nodejs/node/pull/20547
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
This commit is contained in:
Ujjwal Sharma 2018-05-06 00:31:03 +05:30
parent 90e8f79f65
commit 29ccf6e14b
No known key found for this signature in database
GPG Key ID: 1FD3B47B83F46621

View File

@ -232,10 +232,13 @@ session.on('remoteSettings', (settings) => {
added: v8.4.0
-->
The `'stream'` event is emitted when a new `Http2Stream` is created. When
invoked, the handler function will receive a reference to the `Http2Stream`
object, a [HTTP/2 Headers Object][], and numeric flags associated with the
creation of the stream.
* `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 new `Http2Stream` is created.
```js
const http2 = require('http2');