Netty服务端的启动源码分析

ServerBootstrap的构造:

1 public class ServerBootstrap extends AbstractBootstrap<ServerBootstrap, ServerChannel> { 2 private static final InternalLogger logger = InternalLoggerFactory.getInstance(ServerBootstrap.class); 3 private final Map<ChannelOption<?>, Object> childOptions = new LinkedHashMap(); 4 private final Map<AttributeKey<?>, Object> childAttrs = new LinkedHashMap(); 5 private final ServerBootstrapConfig config = new ServerBootstrapConfig(this); 6 private volatile EventLoopGroup childGroup; 7 private volatile ChannelHandler childHandler; 8 9 public ServerBootstrap() { 10 } 11 ...... 12 }

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/zwyfwj.html