3
如果通道在超時毫秒內沒有收到讀/響應,SO_TIMEOUT是否會超時非阻塞通道?非阻塞通道中的SO_TIMEOUT在netty中
bootstrap.group(workerGroup).channel(NioSocketChannel.class).
.handler(channelInitializer).option(ChannelOption.SO_TIMEOUT, 100);
另外,是否也適用於服務器通道的選項?如:
serverBootstrap.group(bossGroup, workerGroup).channel(NioServerSocketChannel.class).
localAddress(new InetSocketAddress(8800)).childHandler(serverChannelInitializer).
option(ChannelOption.SO_TIMEOUT, 100).bind().sync();
感謝信任和諾曼! – user1920845