#
pang.jiabao
2024-10-12 42bb5e28a6d5bca11cb518da4a423ec95c69f5be
src/main/java/com/zy/core/netty/OnlineServer.java
@@ -1,6 +1,7 @@
package com.zy.core.netty;
import com.zy.utils.News;
import com.zy.core.netty.properties.TcpProperties;
import io.netty.bootstrap.ServerBootstrap;
import io.netty.buffer.PooledByteBufAllocator;
@@ -66,7 +67,7 @@
        ResourceLeakDetector.setLevel(ResourceLeakDetector.Level.ADVANCED);
        log.info("TCP server started successfully, port:{}", tcpProperties.getPort());
        News.info("TCP server started successfully, port:{}", tcpProperties.getPort());
        channel = bootstrap.bind(tcpProperties.getPort()).sync().channel();
    }
@@ -86,7 +87,7 @@
        if (workerGroup != null) {
            workerGroup.shutdownGracefully();
        }
        log.info("TCP server stopped successfully, port: {}", tcpProperties.getPort());
        News.info("TCP server stopped successfully, port: {}", tcpProperties.getPort());
    }
}