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