close

fun close(callback: () -> Unit = definedExternally)(source)

Close the underlying socket and stop listening for data on it. If a callback is provided, it is added as a listener for the 'close' event.

Since

v0.1.99

Parameters

callback

Called when the socket has been closed.