事件:'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.

可以使用 http2stream.rstCode 属性检索关闭流时使用的 HTTP/2 错误代码。如果代码是除 NGHTTP2_NO_ERROR (0) 以外的任何值,则也将触发 '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.