Added time field

This commit is contained in:
Collin Smith 2020-06-23 20:33:05 -07:00
parent 24eb6f1c9b
commit c268d69ff9
2 changed files with 4 additions and 6 deletions

View File

@ -1,4 +0,0 @@
package com.riiablo.net.reliable;
public interface PacketData {
}

View File

@ -23,6 +23,8 @@ public class ReliablePacketController {
private final SequenceBuffer<ReceivedPacketData> receivedPackets;
private final SequenceBuffer<FragmentReassemblyData> fragmentReassembly;
private long time;
public ReliablePacketController(ReliableConfiguration config, MessageChannel channel) {
this.config = config;
this.channel = channel;
@ -45,7 +47,7 @@ public class ReliablePacketController {
}
public void update(long time) {
this.time = time;
}
public void sendAck(int channelId, DatagramChannel ch) {
@ -70,7 +72,7 @@ public class ReliablePacketController {
}
SentPacketData sentPacketData = sentPackets.insert(sequence);
// sentPacketData.time = this.time;
sentPacketData.time = this.time;
// sentPacketData.packetSize =
sentPacketData.acked = false;