From 57a8c1167e2b5167a764ab194cde99d3a163e3f4 Mon Sep 17 00:00:00 2001 From: Collin Smith Date: Thu, 25 Jun 2020 14:47:28 -0700 Subject: [PATCH] Fixed debug logging for inbound messages --- core/src/com/riiablo/net/EndpointedChannelHandler.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/src/com/riiablo/net/EndpointedChannelHandler.java b/core/src/com/riiablo/net/EndpointedChannelHandler.java index cd271c2e..782b6ff3 100644 --- a/core/src/com/riiablo/net/EndpointedChannelHandler.java +++ b/core/src/com/riiablo/net/EndpointedChannelHandler.java @@ -42,6 +42,13 @@ public class EndpointedChannelHandler implements ChannelHandler, ChannelInbou : (InetSocketAddress) ctx.channel().remoteAddress(); Gdx.app.log(TAG, "messageReceived received packet from " + sender.getHostName() + ":" + sender.getPort()); } + if (DEBUG_INBOUND) { + if (msg instanceof ByteBuf) { + Gdx.app.debug(TAG, " " + ByteBufUtil.hexDump((ByteBuf) msg)); + } else { + Gdx.app.debug(TAG, " " + msg); + } + } endpoint.messageReceived(ctx, msg); }