netty
l1161558158
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
netty 客户端接入源码分析
netty 客户端接入源码分析 netty 线程选择为NioEventLoop其实际运行的线程函数为 @Override protected void run() { for (;;) { try { try { switch (selectStrategy.calculateStrategy(selectNowS...原创 2019-11-13 22:03:12 · 165 阅读 · 0 评论 -
netty服务端启动过程分析
netty 服务端启动 创建ServerBootstrap,该类是Netty服务端的启动类 绑定Reactor线程池,EventLoopGroup,实际上就是EventLoop的数组.除了处理IO操作外,用户提交的task和定时任务也是由EventLoop执行.避免了多线程竞争的情况 设置并绑定服务端Channel,对于Nio服务端,使用的是NioServerSocketChannel...原创 2019-11-13 21:02:05 · 208 阅读 · 0 评论 -
ZeroCopy
操作系统的ZeroCopy 简单操作 byte[] buf=new byte[1024]; InputStream inputStream=new FileInputStream("in.txt"); OutputStream outputStream = new FileOutputStream("out.txt"); int read; while ((read=inputStream.rea...原创 2019-05-05 00:06:02 · 405 阅读 · 0 评论
分享