use of org.dragonet.protocol.packets.BatchPacket in project DragonProxy by DragonetMC.
the class UpstreamSession method sendAllPackets.
public void sendAllPackets(PEPacket[] packets, boolean high_priority) {
if (// <- this disable batched packets
packets.length < 5 || true)
for (PEPacket packet : packets) sendPacket(packet, high_priority);
else {
BatchPacket batchPacket = new BatchPacket();
// System.out.println("BatchPacket :");
for (PEPacket packet : packets) // System.out.println(" - " + packet.getClass().getSimpleName());
if (high_priority) {
batchPacket.packets.add(packet);
break;
}
sendPacket(batchPacket, high_priority);
}
}
Aggregations