private function setSocketTimeout() { if (!$this->streamSetTimeout()) { throw new \RuntimeException('Failed setting timeout with stream_set_timeout()'); } }