/** * Select and process an array of resources */ public function selectAndProcess() { $read = $this->resources; $unused_write = null; $unsued_exception = null; stream_select($read, $unused_write, $unused_exception, $this->options['timeout_select'], $this->options['timeout_select_microsec']); foreach ($read as $socket) { if ($socket == $this->socket->getResource()) { $this->processMasterSocket(); } else { $this->processClientSocket($socket); } } }