mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
Added Ping / Pong system
This commit is contained in:
parent
1cb30601b5
commit
1ef0a41944
3 changed files with 17 additions and 15 deletions
|
|
@ -604,13 +604,13 @@ class Player{
|
|||
break;
|
||||
}
|
||||
switch($data["id"]){
|
||||
|
||||
case MC_KEEP_ALIVE:
|
||||
|
||||
break;
|
||||
case 0x01:
|
||||
case 0x03:
|
||||
|
||||
break;
|
||||
case MC_PING:
|
||||
$this->dataPacket(MC_PONG, array(
|
||||
"ptime" => $data["time"],
|
||||
"time" => (int) (microtime(true) * 1000),
|
||||
));
|
||||
break;
|
||||
case MC_DISCONNECT:
|
||||
$this->close("client disconnect");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue