Native outgoing packet queue for Altay.
Every session buffers its game packets until the next flush, and every moving entity sends the same packet to everyone who can see it. Doing that in PHP costs a few method calls and array writes per (packet, viewer) pair, which adds up fast with lots of players. This extension keeps the buffer as one native string, writes the varint length prefix on the way in, and fans the same packets out to many queues in a single call.
use altay\netqueue\PacketQueue;
$queue = new PacketQueue();
$queue->add($encodedPacket);
PacketQueue::addToAll([$queueA, $queueB], [$encodedPacket]);
$batch = $queue->take(); //same bytes as PacketBatch::encodeRaw(), ready to compressSee the stub for the full API.
phpize
./configure --enable-netqueue
make
make testRequires PHP 8.3 or newer and a C++20 compiler.