mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-01-19 16:57:20 +07:00
Removed sequence from PacketProcessor#processPacket and PacketTransceiver#receivePacket interfaces
sequence was not used and should remain encapsulated beneath MessageChannel layer
This commit is contained in:
parent
53ceea02a8
commit
53a1a6f117
@ -25,6 +25,6 @@ public abstract class MessageChannel implements ReliablePacketController.PacketL
|
||||
|
||||
public interface PacketTransceiver {
|
||||
void sendPacket(ByteBuf bb);
|
||||
void receivePacket(int sequence, ByteBuf bb);
|
||||
void receivePacket(ByteBuf bb);
|
||||
}
|
||||
}
|
||||
|
@ -96,12 +96,12 @@ public class ReliableEndpoint implements MessageChannel.PacketTransceiver {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void receivePacket(int sequence, ByteBuf bb) {
|
||||
packetProcessor.processPacket(sequence, bb);
|
||||
public void receivePacket(ByteBuf bb) {
|
||||
packetProcessor.processPacket(bb);
|
||||
}
|
||||
|
||||
public interface PacketProcessor {
|
||||
void processPacket(int sequence, ByteBuf bb);
|
||||
void processPacket(ByteBuf bb);
|
||||
}
|
||||
|
||||
public static final Stats stats = new Stats();
|
||||
|
@ -86,7 +86,7 @@ public class TestClient extends ApplicationAdapter implements ReliableEndpoint.P
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processPacket(int sequence, ByteBuf bb) {
|
||||
public void processPacket(ByteBuf bb) {
|
||||
Gdx.app.debug(TAG, "Processing packet...");
|
||||
Gdx.app.log(TAG, ByteBufUtil.hexDump(bb));
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ public class TestServer extends ApplicationAdapter implements ReliableEndpoint.P
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processPacket(int sequence, ByteBuf bb) {
|
||||
public void processPacket(ByteBuf bb) {
|
||||
Gdx.app.debug(TAG, "Processing packet...");
|
||||
Gdx.app.log(TAG, ByteBufUtil.hexDump(bb));
|
||||
|
||||
|
@ -27,7 +27,7 @@ public class UnreliableMessageChannel extends MessageChannel {
|
||||
@Override
|
||||
public void onPacketProcessed(int sequence, ByteBuf bb) {
|
||||
if (DEBUG_RECEIVE) Log.debug(TAG, "onPacketProcessed " + bb);
|
||||
packetTransceiver.receivePacket(sequence, bb);
|
||||
packetTransceiver.receivePacket(bb);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user