Helius
2021-03-05 9e6054ca0612a05ec2b698b8a63db7605c600725
src/main/java/com/xcong/excoin/netty/handler/TcpServerHandler.java
@@ -1,6 +1,6 @@
package com.xcong.excoin.netty.handler;
import com.xcong.excoin.netty.common.ChannelManager;
import com.xcong.excoin.netty.common.ServerChannelManager;
import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
@@ -20,13 +20,13 @@
    @Override
    public void channelActive(ChannelHandlerContext ctx) {
        log.info("[tcp客户端连入服务器]");
        ChannelManager.addTcpChannel(ctx.channel());
        ServerChannelManager.addTcpChannel(ctx.channel());
    }
    @Override
    public void channelInactive(ChannelHandlerContext ctx) {
        log.info("[tcp客户端断开服务器]");
        ChannelManager.removeTcpChannel(ctx.channel());
        ServerChannelManager.removeTcpChannel(ctx.channel());
    }
    @Override