streamingConnectionStatus property

StreamingConnectionStatus streamingConnectionStatus

Returns the current status of the streaming connection. It can be one of connected, connecting, or disconnected. Use the StreamingConnectionHandler if you want to automatically reconnect if the connection is lost.

Implementation

StreamingConnectionStatus get streamingConnectionStatus {
  if (_webSocket != null && _firstMessageReceived) {
    return StreamingConnectionStatus.connected;
  } else if (_webSocket != null) {
    return StreamingConnectionStatus.connecting;
  } else {
    return StreamingConnectionStatus.disconnected;
  }
}