title: What is the difference between ServerBootstrap.option() and ServerBootstrap.childOption() in netty 4.x
body: <p>According to the doc <a href="http://netty.io/wiki/new-and-noteworthy-in-4.0.html#wiki-h3-31" rel="noreferrer">New and noteworthy in 4.0</a>, netty4 provided a new bootstrap API, and the doc gives the following code sample:</p>
  
  <pre><code>public static void main(String[] args) throws Exception {
      // Configure the server.
      EventLoopGroup bossGroup = new NioEventLoopGroup();
      EventLoopGroup workerGroup = new NioEventLoopGroup();
      try {
          ServerBootstrap b = new ServerBootstrap();
          b.group(bossGroup, workerGroup)
           .channel(NioServerSocketChannel.class)
           .option(ChannelOption.SO_BACKLOG, 100)
           .localAddress(8080)
           .childOption(ChannelOption.TCP_NODELAY, true)
           .childHandler(new ChannelInitializer&lt;SocketChannel&gt;() {
               @Override
               public void initChannel(SocketChannel ch) throws Exception {
                   ch.pipeline().addLast(handler1, handler2, ...);
               }
           });
  
          // Start the server.
          ChannelFuture f = b.bind().sync();
  
          // Wait until the server socket is closed.
          f.channel().closeFuture().sync();
      } finally {
          // Shut down all event loops to terminate all threads.
          bossGroup.shutdownGracefully();
          workerGroup.shutdownGracefully();
  
          // Wait until all threads are terminated.
          bossGroup.terminationFuture().sync();
          workerGroup.terminationFuture().sync();
      }
  }
  </code></pre>
  
  <p>The code uses <code>ServerBootStrap.option</code> to set <code>ChannelOption.SO_BACKLOG</code>, and then uses <code>ServerBootStrap.childOption</code> to set <code>ChannelOption.TCP_NODELAY</code>.</p>
  
  <p>What is the difference between <code>ServerBootStrap.option</code> and <code>ServerBootStrap.childOption</code>? How could I know which option should be an <code>option</code> and which should be a <code>childOption</code> ?</p>