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.