gRPC教程netty源码-server端绑定端口流程
源码调用关系图
AbstractBootstrap --> bind() --> doBind() --> doBind0()
- NioServerSocketChannel的bind方法在父类AbstractChannel类,所以channel的调用关系:
AbstractChannel --> bind()
DefaultChannelPipeline --> bind()
AbstractChannelHandlerContext --> bind()
HeadContext --> bind()
-
AbstractChannel.AbstractUnsafe --> bind()
,然后调用AbstractChannel --> doBind()
,而他的实现类看下一步 NioServerSocketChannel --> doBind()