diff --git a/02nio/nio01/src/main/java/java0/nio01/netty/NettyHttpServer.java b/02nio/nio01/src/main/java/java0/nio01/netty/NettyHttpServer.java index 487d7283..d462ea6e 100644 --- a/02nio/nio01/src/main/java/java0/nio01/netty/NettyHttpServer.java +++ b/02nio/nio01/src/main/java/java0/nio01/netty/NettyHttpServer.java @@ -31,6 +31,7 @@ public static void main(String[] args) throws InterruptedException { .childOption(ChannelOption.SO_KEEPALIVE, true) .childOption(ChannelOption.ALLOCATOR, PooledByteBufAllocator.DEFAULT); + //拉起服务,创建Nio管道 b.group(bossGroup, workerGroup).channel(NioServerSocketChannel.class) .handler(new LoggingHandler(LogLevel.INFO)) .childHandler(new HttpInitializer());