【fix】 优化使用 EventLoopGroup bossGroup = EventLoopGroupFactory.createBossGroup();

EventLoopGroup workerGroup = EventLoopGroupFactory.createWorkerGroup();
This commit is contained in:
wujiawei
2025-02-18 17:21:00 +08:00
parent cf10347939
commit 2389a25e11
17 changed files with 116 additions and 97 deletions

View File

@ -0,0 +1,21 @@
package org.framework.lazy.cloud.network.heartbeat.common.factory;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;
public class EventLoopGroupFactory {
private static final EventLoopGroup bossGroup = new NioEventLoopGroup();
private static final EventLoopGroup workerGroup = new NioEventLoopGroup();
public static EventLoopGroup createBossGroup(){
return bossGroup;
}
public static EventLoopGroup createWorkerGroup(){
return workerGroup;
}
}