public function doTick() { if (!$this->rakLib->isTerminated()) { $this->interface->sendTick(); } else { $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"]); } }
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; }