onreconnecting method

dynamic onreconnecting(
  1. ReconnectingCallback callback
)

Registers a handler that will be invoked when the connection starts reconnecting.

callback: The handler that will be invoked when the connection starts reconnecting. Optionally receives a single argument containing the error that caused the connection to start reconnecting (if any).

Implementation

onreconnecting(ReconnectingCallback callback) {
  _reconnectingCallbacks.add(callback);
}