简介 channel作用于管理连接 Channel继承体系 服务端 «interface» Channel «abstract» AbstractChannel «abstract» AbstractNioChannel «abstract» AbstractNioMessageChannel «interface» ServerSocketChannel «interface» ServerChannel NioServerSocketChannel AbstractChannel:包含pipeline,eventLoop和unsafe三大基础 AbstractNioChannel:基于selector AbstractNioMessageChannel:读取消息到列表中 绑定时序 user ServerBootstrap AbstractBootstrap EventLoopGroup AbstractChannel DefaultChannelPipeline HeadContext AbstractUnsafe NioServerSocketChannel bind bind doBind init register bind bind bind bind doBind user ServerBootstrap AbstractBootstrap EventLoopGroup AbstractChannel DefaultChannelPipeline HeadContext AbstractUnsafe NioServerSocketChannel 客户端 «interface» Channel «abstract» AbstractChannel «abstract» AbstractNioChannel «abstract» AbstractNioByteChannel «interface» SocketChannel «interface» DuplexChannel NioSocketChannel AbstractNioByteChannel:通过ByteBuf来读取流 unsafe channel的内部操作最终都是交给unsafe来做的 «interface» Unsafe «abstract» AbstractUnsafe «interface» NioUnsafe «abstract» AbstractNioUnsafe NioMessageUnsafe NioByteUnsafe NioSocketChannelUnsafe