Implement send buffering and queuing for network sessions (#2358)

Async compression and broadcasts are now reliable and don't have race condition bugs.
This features improved performance and significantly reduced bandwidth wastage.

Reduce Level broadcast latency by ticking network after levels. This ensures that session buffers get flushed as soon as possible after level tick, if level broadcasts were done.
This commit is contained in:
Dylan K. Taylor
2018-08-13 14:37:18 +01:00
committed by GitHub
parent 22c8077bdf
commit 15bac8c58a
9 changed files with 225 additions and 87 deletions

View File

@ -87,7 +87,7 @@ class PreSpawnSessionHandler extends SessionHandler{
$this->player->sendAllInventories();
$this->player->getInventory()->sendCreativeContents();
$this->player->getInventory()->sendHeldItem($this->player);
$this->session->sendEncoded($this->server->getCraftingManager()->getCraftingDataPacket());
$this->session->queueCompressed($this->server->getCraftingManager()->getCraftingDataPacket());
$this->server->sendFullPlayerListData($this->player);
}