Forráskód Böngészése

【feat】耳标钳程序修改

523096025 2 éve
szülő
commit
91eb274f61

+ 5 - 5
huimv-eartag2-platform/huimv-eartag2-manage2/src/main/java/com/huimv/eartag2/manage2/netty/EartagServer.java

@@ -25,7 +25,7 @@ public class EartagServer {
     private EartagServerHandler2 serverHandler;
     //监听端口
     private int port = 10023;
-    private int port2 = 10024;
+//    private int port2 = 10024;
     //创建构造方法
     public EartagServer(){
     }
@@ -67,10 +67,10 @@ public class EartagServer {
             System.out.println("# 准备接收数据:");
             //绑定端口,同步等待成功
             ChannelFuture cf = serverBootstrap.bind(port).sync();
-            ChannelFuture cf2 = serverBootstrap.bind(port2).sync();
+//            ChannelFuture cf2 = serverBootstrap.bind(port2).sync();
             // 等待服务端监听端口关闭
             cf.channel().closeFuture().sync();
-            cf2.channel().closeFuture().sync();
+//            cf2.channel().closeFuture().sync();
         }finally {
             //优雅的退出
             bossGroup.shutdownGracefully();
@@ -105,7 +105,7 @@ public class EartagServer {
 //        b.bind(port).sync();
 //        System.out.println("tcp server("+port+") is started..");
 
-        b.bind(port2).sync();
-        System.out.println("tcp server("+port2+") is started..");
+//        b.bind(port2).sync();
+//        System.out.println("tcp server("+port2+") is started..");
     }
 }

+ 1 - 3
huimv-eartag2-platform/huimv-eartag2-manage2/src/main/java/com/huimv/eartag2/manage2/netty/EartagServerHandler2.java

@@ -106,11 +106,9 @@ private IEartagEartagRegister2Service eartagRegisterService;
 
         String[] split = clientAskText.split("\\+");
 
-
         if ("6".equals(split[1])){
-
             System.out.println("pliersDemo------------->" +clientAskText);
-            ctx.writeAndFlush(Unpooled.copiedBuffer("hm+6+0+115.238.57.190+8013+8+end".getBytes()));
+            ctx.writeAndFlush(Unpooled.copiedBuffer("hm+6+0+119.3.44.183+10023+8+end".getBytes()));
         }
 
         if ("7".equals(split[1])){