connectionState method
Returns the current state of the socket.
Implementation
String connectionState() {
switch (connState) {
case SocketStates.connecting:
return 'connecting';
case SocketStates.open:
return 'open';
case SocketStates.closing:
return 'closing';
case SocketStates.closed:
return 'closed';
case SocketStates.disconnected:
return 'disconnected';
default:
return 'closed';
}
}