vertx / io.vertx.reactivex.core.http / HttpServerResponse / closeHandler

closeHandler

open fun closeHandler(handler: Handler<Void>): HttpServerResponse

Set a close handler for the response, this is called when the underlying connection is closed and the response was still using the connection.

For HTTP/1.x it is called when the connection is closed before end() is called, therefore it is not guaranteed to be called.

For HTTP/2 it is called when the related stream is closed, and therefore it will be always be called.

Parameters

handler - the handler

Return
a reference to this, so the API can be used fluently