}).option(ChannelOption.SO_BACKLOG, 128).childOption(ChannelOption.SO_KEEPALIVE, true);
ChannelFuture f = b.bind(host, port).sync();
f.channel().closeFuture().sync();
} finally {
manager.getLoopGroup().shutdownGracefully();
bossGroup.shutdownGracefully();
}
}
public static void main(String[] args) throws Exception {
Server server = new Server();
server.start("192.168.1.12", 8000);