public function pushThreadToMainPacket($str) { $this->externalQueue[] = $str; }
private function tick() { $this->update(); if (($data = $this->readPacket()) !== null) { foreach ($data as $pk) { $this->server->pushThreadToMainPacket($pk); } } while (strlen($data = $this->server->readMainToThreadPacket()) > 0) { $this->writePacket($data); } }