Our own thread, if we write it in main, is

The main thread

  • The selector is created during the creation of the NioEventLoopGroup (which creates a set of NioEventloops)

  • False because our current thread is actually the main thread

  • Create a ServerSocketChannel

  • Initialize the Server Socket channel
  • Select a NioEventLoop from the boss group for server Socket Channel

boss thread

  • Register serverSocketChannel with the selector of the selected NioEventLoop

  • Bind address boot

  • Register the accept connection event (OP_ACCEPT) to selector

  • The first registration is not listeningOP_ACCEPT, but 0

  • End-monitoredOP_ ACCEPTTriggered by fireChannelActive() after bind is done

NioEventLoop is started by executing the Register operation.