public function isConnected()
    {
        if ($this->connected === false) {
            return false;
        }

        // Check if the socket is still connected
        if ($this->socket->isConnected() === false) {
            $this->connected = false;

            return false;
        }

        return true;
    }
public function isConnected()
    {
        if ($this->connected === false) {
            return false;
        }

        // Check if the socket is still connected
        if ($this->socket->isConnected() === false) {
            $this->connected = false;

            return false;
        }

        return true;
    }
public function isConnected ( ) { if ( $ this -> connected === false ) { return false ; } // Check if the socket is still connected if ( $ this -> socket -> isConnected ( ) === false ) { $ this -> connected = false ; return false ; } return true ; }
Returns whether the client is currently connected
Also checks the state of the underlying socket

@return bool
Returns whether the client is currently connected Also checks the state of the underlying socket