| | |
| | | |
| | | |
| | | /** |
| | | * 住链路连接保持 |
| | | * 主链路连接保持 |
| | | * |
| | | * @param ctx |
| | | * @param out |
| | | */ |
| | | public void linkTest(ChannelHandlerContext ctx, OuterPacket out){ |
| | | public void linkTest(ChannelHandlerContext ctx, OuterPacket out) { |
| | | int gnsscenterId = out.getGnsscenterId(); |
| | | ChannelMap.addServerChannel(gnsscenterId, ctx.channel().id()); |
| | | ChannelMap.addServerChannel(gnsscenterId, ctx.channel()); |
| | | OuterPacket rep = new OuterPacket(DataType.UP_LINKTEST_RSP.getCode(), null); |
| | | log.info("住链路连接保持应答({}):{}", DataType.UP_LINKTEST_RSP.getCode(), JSON.toJSONString(rep)); |
| | | log.info("主链路连接保持应答({}):{}", DataType.UP_LINKTEST_RSP.getCode(), JSON.toJSONString(rep)); |
| | | ctx.writeAndFlush(rep); |
| | | ctx.flush(); |
| | | } |