isConnected property

bool get isConnected

Returns true if the connection is connected.

Implementation

bool get isConnected => _state == WebSocketState.connected;