mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-01-19 16:57:20 +07:00
Removed AckPacket and added writeAck function to SinglePacket
This commit is contained in:
parent
990910393b
commit
fbc4019b23
@ -178,6 +178,16 @@ public abstract class Packet {
|
||||
|
||||
writeAckBitByteFlags(bb, ackBits);
|
||||
}
|
||||
|
||||
static void writeAck(ByteBuf bb, int channelId, int ack, int ackBits) {
|
||||
int prefixByte = getAckBitByteFlags(ackBits, ACK);
|
||||
|
||||
bb.writeByte(prefixByte);
|
||||
bb.writeByte(channelId);
|
||||
bb.writeShortLE(ack);
|
||||
|
||||
writeAckBitByteFlags(bb, ackBits);
|
||||
}
|
||||
}
|
||||
|
||||
static class FragmentedPacket extends Packet {
|
||||
@ -270,16 +280,4 @@ public abstract class Packet {
|
||||
return headerSize;
|
||||
}
|
||||
}
|
||||
|
||||
static class AckPacket {
|
||||
static void writeHeader(ByteBuf bb, int channelId, int ack, int ackBits) {
|
||||
int prefixByte = getAckBitByteFlags(ackBits, ACK);
|
||||
|
||||
bb.writeByte(prefixByte);
|
||||
bb.writeByte(channelId);
|
||||
bb.writeShortLE(ack);
|
||||
|
||||
writeAckBitByteFlags(bb, ackBits);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user