I am creating channel using this sample code:
EventLoopGroup group = new NioEventLoopGroup();
try {
Bootstrap b = new Bootstrap();
b.group(group)
.channel(NioSocketChannel.class)
.option(ChannelOption.SO_KEEPALIVE, true)
.handler(new ClientInitializer());
// Start the connection attempt.
Channel ch = b.connect(host, port).sync().channel();
So here my getting a channel(channel future) but my application throughput will be very high so i think that one channel will not be sufficient, so please let me know that how do i create channel pool.
I am using netty 4.0
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…