public function read()
    {
        if (!$this->active || $this->reachedEnd) {
            return false;
        }
        if ($frame = $this->client->readFrame()) {
            if ($this->stopOnEnd && $frame['browser'] == 'end') {
                $this->reachedEnd = true;
                return false;
            }
        }
        return $frame;
    }