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