From 5d17c1fd0636b1d5dfdbace8012a26512bf4b471 Mon Sep 17 00:00:00 2001 From: linwl <304115325@qq.com> Date: Mon, 18 Jan 2021 17:32:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=B0docker=E5=A4=96?= =?UTF-8?q?=E8=BF=90=E8=A1=8C=E7=8E=AF=E5=A2=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../telpo/dipperposition/handler/NettyServerHandler.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/telpo/dipperposition/handler/NettyServerHandler.java b/src/main/java/com/telpo/dipperposition/handler/NettyServerHandler.java index 2ed49b1..9cb2179 100644 --- a/src/main/java/com/telpo/dipperposition/handler/NettyServerHandler.java +++ b/src/main/java/com/telpo/dipperposition/handler/NettyServerHandler.java @@ -92,11 +92,11 @@ public class NettyServerHandler extends ChannelInboundHandlerAdapter { */ @Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { - //接收msg消息{与上一章节相比,此处已经不需要自己进行解码} + //接收msg消息与上一章节相比,此处已经不需要自己进行解码} SocketChannel channel = (SocketChannel) ctx.channel(); String ipAddress = channel.remoteAddress().toString(); - String message = " 接收到消息:{0}, 客户端IP:{1}"; - log.info(message ,msg, ipAddress); + //String message = " 接收到消息:{0}, 客户端IP:{1}"; + log.info("接收到消息:" + msg + "客户端IP:" + ipAddress); String channelAns = ""; // 返回时间指令 @@ -134,7 +134,7 @@ public class NettyServerHandler extends ChannelInboundHandlerAdapter { buf = Unpooled.buffer(astEPHBytes.getBytes().length); } - + log.info(buf.toString()); // 最后把SDBP-AST-TIME、SDBP-AST-POS、SDBP-AST-EPH并包一起发给设备。 // 设备采用16进制获取数据,则代理服务器也是采用16进制返回数据。 // 通知客户端链消息发送成功