private function onReadableSocket(RequestCycle $cycle)
{
$socket = $cycle->socket;
$data = @fread($socket, $cycle->options[self::OP_IO_GRANULARITY]);
if ($data != '') {
$this->consumeSocketData($cycle, $data);
} elseif ($this->isSocketDead($socket)) {
// Some HTTP messages are terminated by the closing of the connection.
// Instead of blanket failing request cycles whose sockets disconnect
// we need to determine if this was one of those HTTP messages.
$this->processDeadSocket($cycle);
}
}