public function getClient()
    {
        if ($this->client instanceof ClientEntity) {
            return $this->client;
        }

        $this->client = $this->server->getClientStorage()->getBySession($this);

        return $this->client;
    }