close

abstract fun close(code: Number = definedExternally, callback: () -> Unit = definedExternally)(source)

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

Since

v8.4.0

Parameters

code=http2.constants.NGHTTP2_NO_ERROR Unsigned 32-bit integer identifying the error code.

callback

An optional function registered to listen for the 'close' event.