1. 3. Bind the Porthistorical

    1. Code to analyze 2. Server binds the port

  2. 2.79 1. Instantiate the Channelhistorical

    Instantiate NioServerSocketChannel through reflection, configure it as non-blocking, and create channelId, Unsafe, and pipeline.

  3. Netty Bind Source: Actually Binding the Listening Porthistorical

    1. Code to analyze. 1.1. How NioEventLoop executes the Runnable. 1.2. What the bind task executed by NioEventLoop does, including JDK NIO bind, channelActive propagation, and registering interest in accept events.

  4. 2. Initialize Channelhistorical

    1. Code to analyze 2. Obtain the channel pipeline and add a ChannelInitializer

  5. Netty Source: NioEventLoop run Methodhistorical

    Code analysis of the NioEventLoop run loop: select, selector rebuild, selected-key optimization, processSelectedKeys, and asynchronous task execution.

  6. 2.91 3. Register the Channelhistorical

    Select a NioEventLoop, create a ChannelPromise/Future, register the channel through Unsafe with the JDK NIO selector, and invoke handlerAdded/initChannel callbacks.

  7. Channel Class Hierarchyhistorical

    1. Channel class hierarchy 2. Config class hierarchy