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']);
    }