protected function readChunk() { $data = $this->client->read(); if (is_bool($data)) { throw new StreamClosedException(); } return $data; }