@@ -1479,6 +1479,9 @@ the client should send the request body.
1479
1479
added: v8.4.0
1480
1480
-->
1481
1481
1482
+ * ` headers ` {HTTP/2 Headers Object}
1483
+ * ` flags ` {number}
1484
+
1482
1485
The ` 'headers' ` event is emitted when an additional block of headers is received
1483
1486
for a stream, such as when a block of ` 1xx ` informational headers is received.
1484
1487
The listener callback is passed the [ HTTP/2 Headers Object] [ ] and flags
@@ -1496,6 +1499,9 @@ stream.on('headers', (headers, flags) => {
1496
1499
added: v8.4.0
1497
1500
-->
1498
1501
1502
+ * ` headers ` {HTTP/2 Headers Object}
1503
+ * ` flags ` {number}
1504
+
1499
1505
The ` 'push' ` event is emitted when response headers for a Server Push stream
1500
1506
are received. The listener callback is passed the [ HTTP/2 Headers Object] [ ] and
1501
1507
flags associated with the headers.
@@ -1512,6 +1518,9 @@ stream.on('push', (headers, flags) => {
1512
1518
added: v8.4.0
1513
1519
-->
1514
1520
1521
+ * ` headers ` {HTTP/2 Headers Object}
1522
+ * ` flags ` {number}
1523
+
1515
1524
The ` 'response' ` event is emitted when a response ` HEADERS ` frame has been
1516
1525
received for this stream from the connected HTTP/2 server. The listener is
1517
1526
invoked with two arguments: an ` Object ` containing the received
@@ -1652,10 +1661,10 @@ server.on('stream', (stream) => {
1652
1661
});
1653
1662
```
1654
1663
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.
1659
1668
1660
1669
When ` options.waitForTrailers ` is set, the ` Http2Stream ` will not automatically
1661
1670
close when the final ` DATA ` frame is transmitted. User code must call either
@@ -1973,6 +1982,8 @@ per session. See the [Compatibility API][].
1973
1982
added: v8.4.0
1974
1983
-->
1975
1984
1985
+ * ` session ` {ServerHttp2Session}
1986
+
1976
1987
The ` 'session' ` event is emitted when a new ` Http2Session ` is created by the
1977
1988
` Http2Server ` .
1978
1989
@@ -1982,6 +1993,9 @@ The `'session'` event is emitted when a new `Http2Session` is created by the
1982
1993
added: v8.4.0
1983
1994
-->
1984
1995
1996
+ * ` error ` {Error}
1997
+ * ` session ` {ServerHttp2Session}
1998
+
1985
1999
The ` 'sessionError' ` event is emitted when an ` 'error' ` event is emitted by
1986
2000
an ` Http2Session ` object associated with the ` Http2Server ` .
1987
2001
@@ -2188,6 +2202,8 @@ per session. See the [Compatibility API][].
2188
2202
added: v8.4.0
2189
2203
-->
2190
2204
2205
+ * ` session ` {ServerHttp2Session}
2206
+
2191
2207
The ` 'session' ` event is emitted when a new ` Http2Session ` is created by the
2192
2208
` Http2SecureServer ` .
2193
2209
@@ -2197,6 +2213,9 @@ The `'session'` event is emitted when a new `Http2Session` is created by the
2197
2213
added: v8.4.0
2198
2214
-->
2199
2215
2216
+ * ` error ` {Error}
2217
+ * ` session ` {ServerHttp2Session}
2218
+
2200
2219
The ` 'sessionError' ` event is emitted when an ` 'error' ` event is emitted by
2201
2220
an ` Http2Session ` object associated with the ` Http2SecureServer ` .
2202
2221
@@ -2258,6 +2277,8 @@ a given number of milliseconds set using `http2secureServer.setTimeout()`.
2258
2277
added: v8.4.0
2259
2278
-->
2260
2279
2280
+ * ` socket ` {stream.Duplex}
2281
+
2261
2282
The ` 'unknownProtocol' ` event is emitted when a connecting client fails to
2262
2283
negotiate an allowed protocol (i.e. HTTP/2 or HTTP/1.1). The event handler
2263
2284
receives the socket for handling. If no listener is registered for this event,
0 commit comments