start method

void start()

Implementation

void start() async {
  try {
    _channel = await platform.connect(config);
    _channel!.stream.listen(_onData, onError: _onError, onDone: _onDone);
    _connectToStomp();
  } catch (err) {
    _onError(err);
    if (config.reconnectDelay.inMilliseconds == 0) {
      _cleanUp();
    } else {
      if (err is TimeoutException) {
        config.onDebugMessage('Connection timed out...reconnecting');
      } else if (err is WebSocketChannelException) {
        config.onDebugMessage('Connection error...reconnecting');
      } else {
        config.onDebugMessage('Unknown connection error...reconnecting');
      }
      _onDone();
    }
  }
}