@@ -1445,6 +1445,9 @@ the client should send the request body.
14451445added: v8.4.0
14461446-->
14471447
1448+ * ` headers ` {HTTP/2 Headers Object}
1449+ * ` flags ` {number}
1450+
14481451The ` 'headers' ` event is emitted when an additional block of headers is received
14491452for a stream, such as when a block of ` 1xx ` informational headers is received.
14501453The listener callback is passed the [ HTTP/2 Headers Object] [ ] and flags
@@ -1462,6 +1465,9 @@ stream.on('headers', (headers, flags) => {
14621465added: v8.4.0
14631466-->
14641467
1468+ * ` headers ` {HTTP/2 Headers Object}
1469+ * ` flags ` {number}
1470+
14651471The ` 'push' ` event is emitted when response headers for a Server Push stream
14661472are received. The listener callback is passed the [ HTTP/2 Headers Object] [ ] and
14671473flags associated with the headers.
@@ -1478,6 +1484,9 @@ stream.on('push', (headers, flags) => {
14781484added: v8.4.0
14791485-->
14801486
1487+ * ` headers ` {HTTP/2 Headers Object}
1488+ * ` flags ` {number}
1489+
14811490The ` 'response' ` event is emitted when a response ` HEADERS ` frame has been
14821491received for this stream from the connected HTTP/2 server. The listener is
14831492invoked with two arguments: an ` Object ` containing the received
@@ -1612,10 +1621,10 @@ server.on('stream', (stream) => {
16121621});
16131622```
16141623
1615- When the ` options.waitForTrailers ` option is set, the ` 'wantTrailers' ` event
1616- will be emitted immediately after queuing the last chunk of payload data to be
1617- sent. The ` http2stream.sendTrailers() ` method can then be used to sent trailing
1618- header fields to the peer.
1624+ Initiates a response. When the ` options.waitForTrailers ` option is set, the
1625+ ` 'wantTrailers' ` event will be emitted immediately after queuing the last chunk
1626+ of payload data to be sent. The ` http2stream.sendTrailers() ` method can then be
1627+ used to sent trailing header fields to the peer.
16191628
16201629When ` options.waitForTrailers ` is set, the ` Http2Stream ` will not automatically
16211630close when the final ` DATA ` frame is transmitted. User code must call either
@@ -1933,6 +1942,8 @@ per session. See the [Compatibility API][].
19331942added: v8.4.0
19341943-->
19351944
1945+ * ` session ` {ServerHttp2Session}
1946+
19361947The ` 'session' ` event is emitted when a new ` Http2Session ` is created by the
19371948` Http2Server ` .
19381949
@@ -1942,6 +1953,9 @@ The `'session'` event is emitted when a new `Http2Session` is created by the
19421953added: v8.4.0
19431954-->
19441955
1956+ * ` error ` {Error}
1957+ * ` session ` {ServerHttp2Session}
1958+
19451959The ` 'sessionError' ` event is emitted when an ` 'error' ` event is emitted by
19461960an ` Http2Session ` object associated with the ` Http2Server ` .
19471961
@@ -2141,6 +2155,8 @@ per session. See the [Compatibility API][].
21412155added: v8.4.0
21422156-->
21432157
2158+ * ` session ` {ServerHttp2Session}
2159+
21442160The ` 'session' ` event is emitted when a new ` Http2Session ` is created by the
21452161` Http2SecureServer ` .
21462162
@@ -2150,6 +2166,9 @@ The `'session'` event is emitted when a new `Http2Session` is created by the
21502166added: v8.4.0
21512167-->
21522168
2169+ * ` error ` {Error}
2170+ * ` session ` {ServerHttp2Session}
2171+
21532172The ` 'sessionError' ` event is emitted when an ` 'error' ` event is emitted by
21542173an ` Http2Session ` object associated with the ` Http2SecureServer ` .
21552174
@@ -2211,6 +2230,8 @@ a given number of milliseconds set using `http2secureServer.setTimeout()`.
22112230added: v8.4.0
22122231-->
22132232
2233+ * ` socket ` {stream.Duplex}
2234+
22142235The ` 'unknownProtocol' ` event is emitted when a connecting client fails to
22152236negotiate an allowed protocol (i.e. HTTP/2 or HTTP/1.1). The event handler
22162237receives the socket for handling. If no listener is registered for this event,
0 commit comments