isConnected

Checks if the WebSocket client is currently connected or in the process of connecting.

Return

true if connected or connecting, otherwise false.