From c268d69ff90bdaf539e3242e9e05766c166031a8 Mon Sep 17 00:00:00 2001 From: Collin Smith Date: Tue, 23 Jun 2020 20:33:05 -0700 Subject: [PATCH] Added time field --- server/netty/src/com/riiablo/net/reliable/PacketData.java | 4 ---- .../com/riiablo/net/reliable/ReliablePacketController.java | 6 ++++-- 2 files changed, 4 insertions(+), 6 deletions(-) delete mode 100644 server/netty/src/com/riiablo/net/reliable/PacketData.java diff --git a/server/netty/src/com/riiablo/net/reliable/PacketData.java b/server/netty/src/com/riiablo/net/reliable/PacketData.java deleted file mode 100644 index 69dbb9c9..00000000 --- a/server/netty/src/com/riiablo/net/reliable/PacketData.java +++ /dev/null @@ -1,4 +0,0 @@ -package com.riiablo.net.reliable; - -public interface PacketData { -} diff --git a/server/netty/src/com/riiablo/net/reliable/ReliablePacketController.java b/server/netty/src/com/riiablo/net/reliable/ReliablePacketController.java index f4f0bacb..0b9d93aa 100644 --- a/server/netty/src/com/riiablo/net/reliable/ReliablePacketController.java +++ b/server/netty/src/com/riiablo/net/reliable/ReliablePacketController.java @@ -23,6 +23,8 @@ public class ReliablePacketController { private final SequenceBuffer receivedPackets; private final SequenceBuffer 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;