onReconnect

abstract fun onReconnect(handler: suspend (Int) -> Unit)

Register a handler for reconnection events. Called when the socket successfully reconnects after a disconnection.

Parameters

handler

Suspend function called on reconnection with attempt number