http2session.close([callback])


正常地关闭 Http2Session,允许任何现有的流自行完成并防止创建新的 Http2Stream 实例。 一旦关闭,如果没有打开的 Http2Stream 实例,则 http2session.destroy() _可能_会被调用。

如果指定,则 callback 函数将注册为 'close' 事件的句柄。

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.

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