Skip to main content

close

method Http2Session.close
Jump to headingHttp2Session.close(callback?: () => void): void

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.

Parameters Jump to heading

optional
Jump to headingcallback: () => void

Return Type Jump to heading

void
Back to top