CompressionThread 5.46.0
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() : stringonRun() protected
php
protected function onRun() : voidquit()
php
public function quit() : void