摘要: NioEventLoop是ServerSocketChannel和SocketChannel通用的EventLoop,从NioEventLoop的执行逻辑开始 下面分别对NioMessageUnsafe以及NioByteUnsafe的read操作进行分析 NioMessageUnsafe用于Serv 阅读全文
posted @ 2017-08-26 22:48 holoyong 阅读(506) 评论(0) 推荐(0) 编辑
摘要: ServerBootstrap在bind时,主要做了3个操作:init、register、bind init ServerBootstrapAcceptor主要就是将channel注册到selector上 register register和bind都涉及到一个接口io.netty.channel. 阅读全文
posted @ 2017-08-26 18:34 holoyong 阅读(500) 评论(0) 推荐(0) 编辑
摘要: DiscardServer 1 package io.netty.example.discard; 2 3 import io.netty.bootstrap.ServerBootstrap; 4 5 import io.netty.channel.ChannelFuture; 6 import i 阅读全文
posted @ 2017-08-26 15:45 holoyong 阅读(504) 评论(0) 推荐(0) 编辑