Fixed debug logging for inbound messages

This commit is contained in:
Collin Smith 2020-06-25 14:47:28 -07:00
parent 17d257b2b0
commit 57a8c1167e

View File

@ -42,6 +42,13 @@ public class EndpointedChannelHandler<T> 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);
}