chen.llin
3 天以前 d3eb689e3755207f69817a5f581ee80b0f102339
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());
    }
}