public function initialize()
    {
        try {
            $this->logger->debug('Connecting to the websocket');
            $this->engine->connect();
            $this->logger->debug('Connected to the server');

            $this->isConnected = true;
        } catch (SocketException $e) {
            $this->logger->error('Could not connect to the server', ['exception' => $e]);

            throw $e;
        }

        return $this;
    }
public function initialize()
    {
        try {
            $this->logger->debug('Connecting to the websocket');
            $this->engine->connect();
            $this->logger->debug('Connected to the server');

            $this->isConnected = true;
        } catch (SocketException $e) {
            $this->logger->error('Could not connect to the server', ['exception' => $e]);

            throw $e;
        }

        return $this;
    }
public function initialize ( ) { try { $ this -> logger -> debug ( 'Connecting to the websocket' ) ; $ this -> engine -> connect ( ) ; $ this -> logger -> debug ( 'Connected to the server' ) ; $ this -> isConnected = true ; } catch ( SocketException $ e ) { $ this -> logger -> error ( 'Could not connect to the server' , [ 'exception' => $ e ] ) ; throw $ e ; } return $ this ; }
Connects to the websocket

@return $this
Connects to the websocket