This commit is contained in:
tanliansheng 2021-05-24 19:24:15 +08:00
parent 7c46874e44
commit fd4b0eff90
4 changed files with 11 additions and 12 deletions

View File

@ -102,6 +102,13 @@
<artifactId>netty-transport</artifactId>
<version>${netty.version}</version>
</dependency>
<!-- linux下有效. 其他linux平台自行修改对应的classifier -->
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
<classifier>linux-x86_64</classifier>
<version>${netty.version}</version>
</dependency>
<!--- ##################使用netty本SDK时的配置 end ##################-->

View File

@ -55,11 +55,7 @@
<artifactId>netty-transport</artifactId>
<version>${netty.version}</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport</artifactId>
<version>${netty.version}</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-epoll</artifactId>

View File

@ -147,8 +147,6 @@ public class CIMNioSocketAcceptor extends SimpleChannelInboundHandler<SentBody>{
private void bindAppPort(){
createAppEventGroup();
appBossGroup = new NioEventLoopGroup(bossThreadFactory);
appWorkerGroup = new NioEventLoopGroup(workerThreadFactory);
ServerBootstrap bootstrap = createServerBootstrap(appBossGroup,appWorkerGroup);
bootstrap.childHandler(new ChannelInitializer<SocketChannel>() {
@Override
@ -178,8 +176,6 @@ public class CIMNioSocketAcceptor extends SimpleChannelInboundHandler<SentBody>{
private void bindWebPort(){
createWebEventGroup();
webBossGroup = new NioEventLoopGroup(bossThreadFactory);
webWorkerGroup = new NioEventLoopGroup(workerThreadFactory);
ServerBootstrap bootstrap = createServerBootstrap(webBossGroup,webWorkerGroup);
bootstrap.childHandler(new ChannelInitializer<SocketChannel>() {