From 2e4724c596dab0646dd6da2e4e3439ef7cf163a6 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Pueyo Date: Tue, 23 Apr 2013 12:18:08 +0200 Subject: [PATCH] Added Query protocol description --- src/network/Query.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/network/Query.php b/src/network/Query.php index a5be6d2ef..d67dee332 100644 --- a/src/network/Query.php +++ b/src/network/Query.php @@ -43,6 +43,14 @@ class Query{ $addr = $this->server->api->getProperty("server-ip", "0.0.0.0"); $port = $this->server->api->getProperty("server-port"); console("[INFO] Setting query port to $port"); + /* + The Query protocol is built on top of the existing Minecraft PE UDP network stack. + Because the 0xFE packet does not exist in the MCPE protocol, + we can identify Query packets and remove them from the packet queue. + + Then, the Query class handles itself sending the packets in raw form, because + packets can conflict with the MCPE ones. + */ $this->server->addHandler("server.unknownpacket", array($this, "packetHandler"), 50); $this->server->schedule(20 * 30, array($this, "regenerateToken"), array(), true); $this->regenerateToken();