Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/fanliang11/surging
Browse files Browse the repository at this point in the history
  • Loading branch information
fanliang11 committed Apr 10, 2024
2 parents a17813a + 11a1db5 commit 483b9a0
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public async Task StartAsync(EndPoint endPoint)
workerGroup = new MultithreadEventLoopGroup();
bootstrap.Channel<TcpServerSocketChannel>();
}
var workerGroup1 = new SingleThreadEventLoop();
var eventExecutor = new MultithreadEventLoopGroup();
bootstrap
.Option(ChannelOption.SoBacklog, AppConfig.ServerOptions.SoBacklog)
.ChildOption(ChannelOption.Allocator, PooledByteBufferAllocator.Default)
Expand All @@ -89,8 +89,8 @@ public async Task StartAsync(EndPoint endPoint)
var pipeline = channel.Pipeline;
pipeline.AddLast(new LengthFieldPrepender(4));
pipeline.AddLast(new LengthFieldBasedFrameDecoder(int.MaxValue, 0, 4, 0, 4));
pipeline.AddLast(workerGroup1, "HandlerAdapter", new TransportMessageChannelHandlerAdapter(_transportMessageDecoder));
pipeline.AddLast(workerGroup1, "ServerHandler", new ServerHandler(async (contenxt, message) =>
pipeline.AddLast(eventExecutor, "HandlerAdapter", new TransportMessageChannelHandlerAdapter(_transportMessageDecoder));
pipeline.AddLast(eventExecutor, "ServerHandler", new ServerHandler(async (contenxt, message) =>
{
var sender = new DotNettyServerMessageSender(_transportMessageEncoder, contenxt);
await OnReceived(sender, message);
Expand Down Expand Up @@ -168,4 +168,4 @@ public override void ExceptionCaught(IChannelHandlerContext context, Exception e

#endregion Help Class
}
}
}

0 comments on commit 483b9a0

Please sign in to comment.