事件:'close'


【Event: 'close'

'close' 事件在 Http2Stream 被销毁时触发。一旦该事件被触发,Http2Stream 实例将不再可用。

【The 'close' event is emitted when the Http2Stream is destroyed. Once this event is emitted, the Http2Stream instance is no longer usable.】

关闭流时使用的 HTTP/2 错误代码可以通过 http2stream.rstCode 属性获取。如果代码的值不是 NGHTTP2_NO_ERROR0),则还会触发一个 'error' 事件。

【The HTTP/2 error code used when closing the stream can be retrieved using the http2stream.rstCode property. If the code is any value other than NGHTTP2_NO_ERROR (0), an 'error' event will have also been emitted.】