phoenix-channel / ch.kuon.phoenix / Socket / onOpen

onOpen

fun onOpen(callback: OpenCallback): Ref

Register an open callback. Multiple callbacks can be registerd.

Note: The callback might be called on another thread

Parameters

callback - A callback function

Return
A reference to the callback that can be used with the Socket.off function.