state property

ConnectionState get state

Implementation

ConnectionState get state {
  switch (type) {
    case 0:
      return ConnectionState.connecting;
    case 1:
      return ConnectionState.connected;
    case 2:
      return ConnectionState.disconnected;
    case 3:
      return ConnectionState.disconnected; // error state
    default:
      return ConnectionState.disconnected;
  }
}