From b832c89dcc75c38ff4f5b9b02ea3810b20dba292 Mon Sep 17 00:00:00 2001 From: Collin Smith Date: Wed, 24 Jun 2020 15:27:58 -0700 Subject: [PATCH] Updated API --- .../netty/src/com/riiablo/net/reliable/ReliableEndpoint.java | 5 ----- server/netty/src/com/riiablo/net/reliable/TestClient.java | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/server/netty/src/com/riiablo/net/reliable/ReliableEndpoint.java b/server/netty/src/com/riiablo/net/reliable/ReliableEndpoint.java index 2b8e11a3..6719911b 100644 --- a/server/netty/src/com/riiablo/net/reliable/ReliableEndpoint.java +++ b/server/netty/src/com/riiablo/net/reliable/ReliableEndpoint.java @@ -6,7 +6,6 @@ import io.netty.channel.Channel; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.socket.DatagramChannel; import io.netty.channel.socket.DatagramPacket; -import java.net.InetSocketAddress; import java.nio.ByteBuffer; import org.apache.commons.lang3.Validate; @@ -48,10 +47,6 @@ public class ReliableEndpoint implements PacketSender, MessageChannel.Packe } } - public InetSocketAddress remoteAddress() { - return channel.remoteAddress(); - } - @Override public Channel channel() { return channel; diff --git a/server/netty/src/com/riiablo/net/reliable/TestClient.java b/server/netty/src/com/riiablo/net/reliable/TestClient.java index 4cfc7c86..f414459c 100644 --- a/server/netty/src/com/riiablo/net/reliable/TestClient.java +++ b/server/netty/src/com/riiablo/net/reliable/TestClient.java @@ -61,7 +61,7 @@ public class TestClient extends ApplicationAdapter implements PacketProcessor { } void init() { - InetSocketAddress remoteAddress = endpoint.remoteAddress(); + InetSocketAddress remoteAddress = (InetSocketAddress) endpoint.channel().remoteAddress(); Gdx.app.log(TAG, "Sending Connection packet to " + remoteAddress.getHostString() + ":" + remoteAddress.getPort()); FlatBufferBuilder builder = new FlatBufferBuilder();