代码调整
This commit is contained in:
@@ -43,10 +43,27 @@ public class NettyServerHandler extends SimpleChannelInboundHandler<String> {
|
||||
}else{
|
||||
channel.writeAndFlush("socket指令结果:成功指令");
|
||||
}*/
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("requestId","yjc_ytxjy");
|
||||
jsonObject.put("code","10200");
|
||||
channel.writeAndFlush(jsonObject.toJSONString()+'\n');
|
||||
if(!msg.contains("HeartBeat")){
|
||||
JSONObject jsonObject1 = new JSONObject();
|
||||
jsonObject1.put("requestId","yjc_ytxjy");
|
||||
jsonObject1.put("operateCode","INIT_GATHER");
|
||||
jsonObject1.put("code","10201");
|
||||
channel.writeAndFlush(jsonObject1.toJSONString()+'\n');
|
||||
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("requestId","yjc_ytxjy");
|
||||
jsonObject.put("operateCode","INIT_GATHER");
|
||||
jsonObject.put("code","10200");
|
||||
channel.writeAndFlush(jsonObject.toJSONString()+'\n');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user