mirror of
https://gitee.com/wujiawei1207537021/wu-lazy-cloud-network.git
synced 2025-06-16 18:35:05 +08:00
【fix】 优化使用 EventLoopGroup bossGroup = EventLoopGroupFactory.createBossGroup();
EventLoopGroup workerGroup = EventLoopGroupFactory.createWorkerGroup();
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user