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

disconnect

fun disconnect(callback: (() -> Unit)? = null, code: Int? = null, reason: String? = null): Unit

Disconnect the socket.

Note: The callback might be called on another thread

Parameters

callback - Optional callback called after the socket is disconnected.

code - Send a disconnect code to the server

reason - Send a disconnect reason to the server