1.实例化、初始化、并注册channel
Java · 4 notes
- 2.79 1. Instantiate the Channelhistorical
Instantiate NioServerSocketChannel through reflection, configure it as non-blocking, and create channelId, Unsafe, and pipeline.
- 2. Initialize Channelhistorical
1. Code to analyze 2. Obtain the channel pipeline and add a ChannelInitializer
- 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.