Skip to content

CompressionThread 5.46.0 ​

final class · pocketmine\network\mcpe\compression\CompressionThread · source

Extends Thread

Compresses packet batches for the main thread (see CompressionThreadDispatcher). Jobs arrive as "<4-byte id><batch>" strings and go back as "<4-byte id><compression algorithm byte><compressed batch>", in the order they were submitted, so every session's batches keep their order.

Methods ​

__construct() ​

php
public function __construct(\pocketmine\thread\log\ThreadSafeLogger $logger, \pmmp\thread\ThreadSafeArray $mainToThreadBuffer, \pmmp\thread\ThreadSafeArray $threadToMainBuffer, \pocketmine\snooze\SleeperHandlerEntry $sleeperEntry, \pocketmine\thread\NonThreadSafeValue $compressor)

getThreadName() ​

php
public function getThreadName() : string

onRun() protected ​

php
protected function onRun() : void

quit() ​

php
public function quit() : void

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.