From e07e6bd2ba480e5499667a280655225440df45c9 Mon Sep 17 00:00:00 2001 From: Collin Smith Date: Wed, 24 Jun 2020 00:59:26 -0700 Subject: [PATCH] Refactored changed time to delta where appropriate --- server/netty/src/com/riiablo/net/reliable/MessageChannel.java | 2 +- .../netty/src/com/riiablo/net/reliable/ReliableEndpoint.java | 4 ++-- .../com/riiablo/net/reliable/ReliablePacketController.java | 2 +- .../riiablo/net/reliable/channel/ReliableMessageChannel.java | 2 +- .../net/reliable/channel/UnreliableMessageChannel.java | 4 ++-- .../net/reliable/channel/UnreliableOrderedMessageChannel.java | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/server/netty/src/com/riiablo/net/reliable/MessageChannel.java b/server/netty/src/com/riiablo/net/reliable/MessageChannel.java index 02c38e1a..6e627e6d 100644 --- a/server/netty/src/com/riiablo/net/reliable/MessageChannel.java +++ b/server/netty/src/com/riiablo/net/reliable/MessageChannel.java @@ -19,7 +19,7 @@ public abstract class MessageChannel implements ReliablePacketController.PacketL } public abstract void reset(); - public abstract void update(long time, DatagramChannel ch); + public abstract void update(long delta, DatagramChannel ch); public abstract void sendMessage(int channelId, DatagramChannel ch, ByteBuf bb); public abstract void onMessageReceived(ChannelHandlerContext ctx, DatagramPacket packet); diff --git a/server/netty/src/com/riiablo/net/reliable/ReliableEndpoint.java b/server/netty/src/com/riiablo/net/reliable/ReliableEndpoint.java index 0aed2e7f..03ce560b 100644 --- a/server/netty/src/com/riiablo/net/reliable/ReliableEndpoint.java +++ b/server/netty/src/com/riiablo/net/reliable/ReliableEndpoint.java @@ -53,8 +53,8 @@ public class ReliableEndpoint implements MessageChannel.PacketTransceiver { for (MessageChannel mc : channels) if (mc != null) mc.reset(); } - public void update(long time) { - for (MessageChannel mc : channels) if (mc != null) mc.update(time, channel); + public void update(long delta) { + for (MessageChannel mc : channels) if (mc != null) mc.update(delta, channel); } public void sendMessage(QoS qos, ByteBuffer bb) { diff --git a/server/netty/src/com/riiablo/net/reliable/ReliablePacketController.java b/server/netty/src/com/riiablo/net/reliable/ReliablePacketController.java index ed6cd35e..25a19704 100644 --- a/server/netty/src/com/riiablo/net/reliable/ReliablePacketController.java +++ b/server/netty/src/com/riiablo/net/reliable/ReliablePacketController.java @@ -46,7 +46,7 @@ public class ReliablePacketController { } - public void update(long time) { + public void update(long delta) { this.time = time; } diff --git a/server/netty/src/com/riiablo/net/reliable/channel/ReliableMessageChannel.java b/server/netty/src/com/riiablo/net/reliable/channel/ReliableMessageChannel.java index 31a89b29..4a8bac2f 100644 --- a/server/netty/src/com/riiablo/net/reliable/channel/ReliableMessageChannel.java +++ b/server/netty/src/com/riiablo/net/reliable/channel/ReliableMessageChannel.java @@ -22,7 +22,7 @@ public class ReliableMessageChannel extends MessageChannel { } @Override - public void update(long time, DatagramChannel ch) { + public void update(long delta, DatagramChannel ch) { } diff --git a/server/netty/src/com/riiablo/net/reliable/channel/UnreliableMessageChannel.java b/server/netty/src/com/riiablo/net/reliable/channel/UnreliableMessageChannel.java index c74dcdbf..23292ea1 100644 --- a/server/netty/src/com/riiablo/net/reliable/channel/UnreliableMessageChannel.java +++ b/server/netty/src/com/riiablo/net/reliable/channel/UnreliableMessageChannel.java @@ -36,8 +36,8 @@ public class UnreliableMessageChannel extends MessageChannel { } @Override - public void update(long time, DatagramChannel ch) { - packetController.update(time); + public void update(long delta, DatagramChannel ch) { + packetController.update(delta); } @Override diff --git a/server/netty/src/com/riiablo/net/reliable/channel/UnreliableOrderedMessageChannel.java b/server/netty/src/com/riiablo/net/reliable/channel/UnreliableOrderedMessageChannel.java index 22feb2b5..f6fc72c5 100644 --- a/server/netty/src/com/riiablo/net/reliable/channel/UnreliableOrderedMessageChannel.java +++ b/server/netty/src/com/riiablo/net/reliable/channel/UnreliableOrderedMessageChannel.java @@ -31,8 +31,8 @@ public class UnreliableOrderedMessageChannel extends MessageChannel { } @Override - public void update(long time, DatagramChannel ch) { - packetController.update(time); + public void update(long delta, DatagramChannel ch) { + packetController.update(delta); } @Override