The parameters that we set using ServerBootStrap.option apply to the ChannelConfig of a newly created ServerChannel, i.e., the server socket which listens for and accepts the client connections. These options will be set on the Server Channel when bi…
BootStrap在netty的应用程序中负责引导服务器和客户端.netty包含了两种不同类型的引导: 1. 使用服务器的ServerBootStrap,用于接受客户端的连接以及为已接受的连接创建子通道. 2. 用于客户端的BootStrap,不接受新的连接,并且是在父通道类完成一些操作. 一般服务端的代码如下所示: SimpleServer.java /** * Created by chenhao on 2019/9/4. */ public final class SimpleServer…