public function handleWsConnection(WebSocket $ws)
    {
        $this->ws        = $ws;
        $this->connected = true;

        $this->logger->info('websocket connection has been created');

        $ws->on('message', [$this, 'handleWsMessage']);
        $ws->on('close', [$this, 'handleWsClose']);
        $ws->on('error', [$this, 'handleWsError']);
    }
public function handleWsConnection(WebSocket $ws)
    {
        $this->ws        = $ws;
        $this->connected = true;

        $this->logger->info('websocket connection has been created');

        $ws->on('message', [$this, 'handleWsMessage']);
        $ws->on('close', [$this, 'handleWsClose']);
        $ws->on('error', [$this, 'handleWsError']);
    }
public function handleWsConnection ( WebSocket $ ws ) { $ this -> ws = $ ws ; $ this -> connected = true ; $ this -> logger -> info ( 'websocket connection has been created' ) ; $ ws -> on ( 'message' , [ $ this , 'handleWsMessage' ] ) ; $ ws -> on ( 'close' , [ $ this , 'handleWsClose' ] ) ; $ ws -> on ( 'error' , [ $ this , 'handleWsError' ] ) ; }
Handles WebSocket connections received by the client.

@param WebSocket $ws WebSocket client.
Handles WebSocket connections received by the client .