Sfoglia il codice sorgente

接收到数据,做回复

zjs 1 settimana fa
parent
commit
972c68e331

+ 2 - 0
src/main/java/com/cn/esermis/netty/BootNettyChannelInboundHandlerAdapter.java

@@ -80,6 +80,8 @@ public class BootNettyChannelInboundHandlerAdapter extends ChannelInboundHandler
80 80
             if (message.contains(Constant.MINUTE_STR) || message.contains(Constant.HOUR_STR)) {
81 81
                 log.info("=============" + (new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss")).format(new Date()) + "=============");
82 82
                 log.info("收到数据:" + message);
83
+                String reply = HJ212MsgUtils.reply(message);
84
+                ctx.writeAndFlush(reply);
83 85
             }
84 86
             if (message.contains("&&")) {
85 87
                 String[] split = message.split("&&");

File diff suppressed because it is too large
+ 37 - 1
src/main/java/com/cn/esermis/utils/HJ212MsgUtils.java