public function process() { $work = \false; if ($this->interface->handlePacket()) { $work = \true; while ($this->interface->handlePacket()) { } } $this->doTick(); return $work; }
public function process() { $work = false; if ($this->interface->handlePacket()) { $work = true; while ($this->interface->handlePacket()) { } } if ($this->rakLib->isTerminated()) { $this->network->unregisterInterface($this); throw new \Exception("RakLib Thread crashed"); } return $work; }
public function process() { $work = false; if ($this->interface->handlePacket()) { $work = true; while ($this->interface->handlePacket()) { } } if ($this->rakLib->isTerminated()) { $info = $this->rakLib->getTerminationInfo(); $this->network->unregisterInterface($this); \ExceptionHandler::handler(E_ERROR, "RakLib Thread crashed [" . $info["scope"] . "]: " . (isset($info["message"]) ? $info["message"] : ""), $info["file"], $info["line"]); } return $work; }
public function process() { $work = false; if ($this->interface->handlePacket()) { $work = true; if ($this->timeout < 0) { while ($this->interface->handlePacket()) { } } else { $timestamp = time(); while ($this->interface->handlePacket()) { if (time() - $timestamp >= $this->timeout) { break; } } } } if ($this->rakLib->isTerminated()) { $this->network->unregisterInterface($this); throw new \Exception("A RakLib Thread crashed!"); } return $work; }