http2session.close([callback])


优雅地关闭 Http2Session,允许现有的流自行完成,并阻止创建新的 Http2Stream 实例。关闭后,如果没有打开的 Http2Stream 实例,可能会调用 http2session.destroy()

【Gracefully closes the Http2Session, allowing any existing streams to complete on their own and preventing new Http2Stream instances from being created. Once closed, http2session.destroy() might be called if there are no open Http2Stream instances.】

如果指定,callback 函数将被注册为 'close' 事件的处理程序。

【If specified, the callback function is registered as a handler for the 'close' event.】