/** * Go into a loop accepting jobs and performing the work. */ public function work() { if (empty($this->workerList)) { throw new NoRegisteredFunctionException(); } if (!$this->stop) { $this->grabJob(); while (!$this->stop) { $packet = $this->connection->readPacket(); $this->processPacket($packet); } } }
private function packetIteration() { $packet = $this->connection->readPacket(); $this->processPacket($packet); }