onClose

abstract fun onClose(block: () -> Unit)(source)

Callback for when the connection is closed for any reason.

This should be invoked when close() is called as well.