added getConnectionState to client