@@ -1479,6 +1479,9 @@ the client should send the request body.
14791479added: v8.4.0
14801480-->
14811481
1482+ * ` headers ` {HTTP/2 Headers Object}
1483+ * ` flags ` {number}
1484+
14821485The ` 'headers' ` event is emitted when an additional block of headers is received
14831486for a stream, such as when a block of ` 1xx ` informational headers is received.
14841487The listener callback is passed the [ HTTP/2 Headers Object] [ ] and flags
@@ -1496,6 +1499,9 @@ stream.on('headers', (headers, flags) => {
14961499added: v8.4.0
14971500-->
14981501
1502+ * ` headers ` {HTTP/2 Headers Object}
1503+ * ` flags ` {number}
1504+
14991505The ` 'push' ` event is emitted when response headers for a Server Push stream
15001506are received. The listener callback is passed the [ HTTP/2 Headers Object] [ ] and
15011507flags associated with the headers.
@@ -1512,6 +1518,9 @@ stream.on('push', (headers, flags) => {
15121518added: v8.4.0
15131519-->
15141520
1521+ * ` headers ` {HTTP/2 Headers Object}
1522+ * ` flags ` {number}
1523+
15151524The ` 'response' ` event is emitted when a response ` HEADERS ` frame has been
15161525received for this stream from the connected HTTP/2 server. The listener is
15171526invoked with two arguments: an ` Object ` containing the received
@@ -1652,10 +1661,10 @@ server.on('stream', (stream) => {
16521661});
16531662```
16541663
1655- When the ` options.waitForTrailers ` option is set, the ` 'wantTrailers' ` event
1656- will be emitted immediately after queuing the last chunk of payload data to be
1657- sent. The ` http2stream.sendTrailers() ` method can then be used to sent trailing
1658- header fields to the peer.
1664+ Initiates a response. When the ` options.waitForTrailers ` option is set, the
1665+ ` 'wantTrailers' ` event will be emitted immediately after queuing the last chunk
1666+ of payload data to be sent. The ` http2stream.sendTrailers() ` method can then be
1667+ used to sent trailing header fields to the peer.
16591668
16601669When ` options.waitForTrailers ` is set, the ` Http2Stream ` will not automatically
16611670close when the final ` DATA ` frame is transmitted. User code must call either
@@ -1973,6 +1982,8 @@ per session. See the [Compatibility API][].
19731982added: v8.4.0
19741983-->
19751984
1985+ * ` session ` {ServerHttp2Session}
1986+
19761987The ` 'session' ` event is emitted when a new ` Http2Session ` is created by the
19771988` Http2Server ` .
19781989
@@ -1982,6 +1993,9 @@ The `'session'` event is emitted when a new `Http2Session` is created by the
19821993added: v8.4.0
19831994-->
19841995
1996+ * ` error ` {Error}
1997+ * ` session ` {ServerHttp2Session}
1998+
19851999The ` 'sessionError' ` event is emitted when an ` 'error' ` event is emitted by
19862000an ` Http2Session ` object associated with the ` Http2Server ` .
19872001
@@ -2188,6 +2202,8 @@ per session. See the [Compatibility API][].
21882202added: v8.4.0
21892203-->
21902204
2205+ * ` session ` {ServerHttp2Session}
2206+
21912207The ` 'session' ` event is emitted when a new ` Http2Session ` is created by the
21922208` Http2SecureServer ` .
21932209
@@ -2197,6 +2213,9 @@ The `'session'` event is emitted when a new `Http2Session` is created by the
21972213added: v8.4.0
21982214-->
21992215
2216+ * ` error ` {Error}
2217+ * ` session ` {ServerHttp2Session}
2218+
22002219The ` 'sessionError' ` event is emitted when an ` 'error' ` event is emitted by
22012220an ` Http2Session ` object associated with the ` Http2SecureServer ` .
22022221
@@ -2258,6 +2277,8 @@ a given number of milliseconds set using `http2secureServer.setTimeout()`.
22582277added: v8.4.0
22592278-->
22602279
2280+ * ` socket ` {stream.Duplex}
2281+
22612282The ` 'unknownProtocol' ` event is emitted when a connecting client fails to
22622283negotiate an allowed protocol (i.e. HTTP/2 or HTTP/1.1). The event handler
22632284receives the socket for handling. If no listener is registered for this event,
0 commit comments