Пример #1
0
 public function shutdown()
 {
     $buffer = chr(RakLib::PACKET_SHUTDOWN);
     $this->server->pushMainToThreadPacket($buffer);
     $this->server->synchronized(function () {
         $this->server->wait(20000);
     });
     $this->server->join();
 }