【发布时间】:2019-10-06 06:57:06
【问题描述】:
在我的 netty 应用程序中,我使用 EpollChannelOption.TCP_MD5SIG 引导服务器通道并提供 IP 密钥映射:
Map<InetAddress, byte[]> md5keys = …..//set initial peer-ips and keys
ServerBootstrap b = new ServerBootstrap();
b.group(bossGroup, workerGroup)
.channel(EpollServerSocketChannel.class)
.handler(new LoggingHandler(LogLevel.INFO))
.childHandler(new MyServerInitializer());
b.childOption(ChannelOption.SO_KEEPALIVE, true);
b.childOption(ChannelOption.TCP_NODELAY, true);
b.option(EpollChannelOption.TCP_MD5SIG, md5keys);
是否可以在通道已经处于活动状态并为客户端提供服务后更改md5keys 映射(例如添加新的 ip)而不中断与这些客户端的通信?
【问题讨论】:
标签: netty