consik/yii2-websocket

Error

Opened this issue · 1 comments

How check this error Undefined property: Ratchet\Server\IoConnection::$id ?

This is because you need to initialize the properties you want to use on the init() method of your server:

        $this->on(self::EVENT_CLIENT_CONNECTED, function (WSClientEvent $e) {
            $e->client->id = null; // this
        });