phoenix-channel / ch.kuon.phoenix / Channel / onClose

onClose

fun onClose(callback: () -> Unit): Ref

Register a close callback

Note: the callback might be called on another thread

Parameters

callback - A callback called when the channel is closed

Return
A ref that can be used with Channel.off