@@ -631,7 +631,7 @@ All [`Http2Stream`][] instances are destroyed either when:
631
631
When an ` Http2Stream ` instance is destroyed, an attempt will be made to send an
632
632
` RST_STREAM ` frame will be sent to the connected peer.
633
633
634
- Once the ` Http2Stream ` instance is destroyed, the ` 'streamClosed ' ` event will
634
+ When the ` Http2Stream ` instance is destroyed, the ` 'close ' ` event will
635
635
be emitted. Because ` Http2Stream ` is an instance of ` stream.Duplex ` , the
636
636
` 'end' ` event will also be emitted if the stream data is currently flowing.
637
637
The ` 'error' ` event may also be emitted if ` http2stream.destroy() ` was called
@@ -653,6 +653,18 @@ abnormally aborted in mid-communication.
653
653
* Note* : The ` 'aborted' ` event will only be emitted if the ` Http2Stream `
654
654
writable side has not been ended.
655
655
656
+ #### Event: 'close'
657
+ <!-- YAML
658
+ added: v8.4.0
659
+ -->
660
+
661
+ The ` 'close' ` event is emitted when the ` Http2Stream ` is destroyed. Once
662
+ this event is emitted, the ` Http2Stream ` instance is no longer usable.
663
+
664
+ The listener callback is passed a single argument specifying the HTTP/2 error
665
+ code specified when closing the stream. If the code is any value other than
666
+ ` NGHTTP2_NO_ERROR ` (` 0 ` ), an ` 'error' ` event will also be emitted.
667
+
656
668
#### Event: 'error'
657
669
<!-- YAML
658
670
added: v8.4.0
@@ -672,18 +684,6 @@ argument identifying the frame type, and an integer argument identifying the
672
684
error code. The ` Http2Stream ` instance will be destroyed immediately after the
673
685
` 'frameError' ` event is emitted.
674
686
675
- #### Event: 'streamClosed'
676
- <!-- YAML
677
- added: v8.4.0
678
- -->
679
-
680
- The ` 'streamClosed' ` event is emitted when the ` Http2Stream ` is destroyed. Once
681
- this event is emitted, the ` Http2Stream ` instance is no longer usable.
682
-
683
- The listener callback is passed a single argument specifying the HTTP/2 error
684
- code specified when closing the stream. If the code is any value other than
685
- ` NGHTTP2_NO_ERROR ` (` 0 ` ), an ` 'error' ` event will also be emitted.
686
-
687
687
#### Event: 'timeout'
688
688
<!-- YAML
689
689
added: v8.4.0
0 commit comments