on Disconnect
Register a handler for disconnection events. Called when the socket disconnects (either intentionally or due to error).
Parameters
handler
Suspend function called on disconnection with reason
Register a handler for disconnection events. Called when the socket disconnects (either intentionally or due to error).
Suspend function called on disconnection with reason