connect method

void connect()

Opens a web socket channel to the server and attempts to keep it alive.

Implementation

void connect() {
  _keepAlive = true;
  if (client.streamingConnectionStatus ==
      StreamingConnectionStatus.disconnected) {
    client.openStreamingConnection(disconnectOnLostInternetConnection: true);
  }
}