fun disconnect(callback: (() -> Unit)? = null, code: Int? = null, reason: String? = null): Unit
Disconnect the socket.
Note: The callback might be called on another thread
callback - Optional callback called after the socket is disconnected.
callback
code - Send a disconnect code to the server
code
reason - Send a disconnect reason to the server
reason