connectionState property
Stream<SocketConnectionState>
get
connectionState
The current connection state of the underlying socket.
Emits SocketConnectionState.notConnected before the first connection, then every
transition — including connecting / connected after a reconnect — on the same
stream. Callers do not need a SocketClient reference to observe a lost connection.
Implementation
Stream<SocketConnectionState> get connectionState => _connectionState.stream;