http2stream.close(code[, callback])


  • code <number> 无符号 32 位整数,用于标识错误代码。 默认值: http2.constants.NGHTTP2_NO_ERROR (0x00)。
  • callback <Function> 一个可选的函数,用于注册以监听 'close' 事件。

通过向连接的 HTTP/2 对端发送 RST_STREAM 帧来关闭 Http2Stream 实例。

【Closes the Http2Stream instance by sending an RST_STREAM frame to the connected HTTP/2 peer.】