| | |
| | | package com.xcong.excoin.netty.client; |
| | | |
| | | import com.xcong.excoin.netty.common.ClientChannelManager; |
| | | import io.netty.channel.ChannelHandlerContext; |
| | | import io.netty.channel.ChannelInboundHandlerAdapter; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | |
| | | @Override |
| | | public void channelActive(ChannelHandlerContext ctx) throws Exception { |
| | | log.info("消息收到"); |
| | | ClientChannelManager.addServerGroup(ctx.channel()); |
| | | } |
| | | |
| | | @Override |
| | |
| | | log.info("消息收到"); |
| | | } |
| | | |
| | | @Override |
| | | public void channelInactive(ChannelHandlerContext ctx) throws Exception { |
| | | ClientChannelManager.removeServerGroup(ctx.channel()); |
| | | } |
| | | } |