diff options
author | James M Snell <jasnell@gmail.com> | 2017-11-25 13:02:16 -0800 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2017-11-28 10:30:39 -0800 |
commit | 1b99542ea49b302c7e13f16b81cd7420eb76fc2e (patch) | |
tree | c492ab657570a43c62eb3f22daac00f46da80a20 /doc | |
parent | df33d8d0b39be893ad7864cc5e1b65bc448ba1f4 (diff) | |
download | android-node-v8-1b99542ea49b302c7e13f16b81cd7420eb76fc2e.tar.gz android-node-v8-1b99542ea49b302c7e13f16b81cd7420eb76fc2e.tar.bz2 android-node-v8-1b99542ea49b302c7e13f16b81cd7420eb76fc2e.zip |
http2: use 'close' event instead of 'streamClosed'
PR-URL: https://github.com/nodejs/node/pull/17328
Fixes: https://github.com/nodejs/node/issues/15303
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Sebastiaan Deckers <sebdeckers83@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/http2.md | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/doc/api/http2.md b/doc/api/http2.md index ec3cef8aa0..86b9c5701f 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -633,7 +633,7 @@ All [`Http2Stream`][] instances are destroyed either when: When an `Http2Stream` instance is destroyed, an attempt will be made to send an `RST_STREAM` frame will be sent to the connected peer. -Once the `Http2Stream` instance is destroyed, the `'streamClosed'` event will +When the `Http2Stream` instance is destroyed, the `'close'` event will be emitted. Because `Http2Stream` is an instance of `stream.Duplex`, the `'end'` event will also be emitted if the stream data is currently flowing. The `'error'` event may also be emitted if `http2stream.destroy()` was called @@ -655,6 +655,18 @@ abnormally aborted in mid-communication. *Note*: The `'aborted'` event will only be emitted if the `Http2Stream` writable side has not been ended. +#### Event: 'close' +<!-- YAML +added: v8.4.0 +--> + +The `'close'` event is emitted when the `Http2Stream` is destroyed. Once +this event is emitted, the `Http2Stream` instance is no longer usable. + +The listener callback is passed a single argument specifying the HTTP/2 error +code specified when closing the stream. If the code is any value other than +`NGHTTP2_NO_ERROR` (`0`), an `'error'` event will also be emitted. + #### Event: 'error' <!-- YAML added: v8.4.0 @@ -674,18 +686,6 @@ argument identifying the frame type, and an integer argument identifying the error code. The `Http2Stream` instance will be destroyed immediately after the `'frameError'` event is emitted. -#### Event: 'streamClosed' -<!-- YAML -added: v8.4.0 ---> - -The `'streamClosed'` event is emitted when the `Http2Stream` is destroyed. Once -this event is emitted, the `Http2Stream` instance is no longer usable. - -The listener callback is passed a single argument specifying the HTTP/2 error -code specified when closing the stream. If the code is any value other than -`NGHTTP2_NO_ERROR` (`0`), an `'error'` event will also be emitted. - #### Event: 'timeout' <!-- YAML added: v8.4.0 |