重新开始---sgg-netty----6-1

关于handler和childhandler的区别。

handler是bossGroup的

childhandler是workGroup的

------------------

组件:

BootStrap和ServerBootstrap。

重新开始---sgg-netty----6-1

Future和ChannelFuture

重新开始---sgg-netty----6-1

channel

重新开始---sgg-netty----6-1

重新开始---sgg-netty----6-1

-------------------------------------------------------56-----------------------------------------------------------

重新开始---sgg-netty----6-1

channelhandler是在哪里的呢?

-------------------------------------------------------

重新开始---sgg-netty----6-1

重新开始---sgg-netty----6-1

重新开始---sgg-netty----6-1

重新开始---sgg-netty----6-1

入栈的IO事件:在管道里面读

出栈IO:写

这个为什么可以处理出栈和入栈的操作?

重新开始---sgg-netty----6-1

重新开始---sgg-netty----6-1

重新开始---sgg-netty----6-1

重新开始---sgg-netty----6-1

重新开始---sgg-netty----6-1

重新开始---sgg-netty----6-1

重新开始---sgg-netty----6-1

上下文,这个ctx也就是channelhandlercontext是一个channelHandler一个,channelhandler是我们自定义被包裹为channelhandlerContext加入到channelPipleLine里面的。一个channel一个channelPipleLine。

比如这里就加了两个:

重新开始---sgg-netty----6-1

重新开始---sgg-netty----6-1

重新开始---sgg-netty----6-1

重新开始---sgg-netty----6-1

重新开始---sgg-netty----6-1

同理尾部:

重新开始---sgg-netty----6-1

ctx的真实类型:

重新开始---sgg-netty----6-1

链表的第一个其实是这个实例:

重新开始---sgg-netty----6-1

双向链表。

重新开始---sgg-netty----6-1handler是非常庞大的。

重新开始---sgg-netty----6-1

-------------------------------------------------------57-------58----------------------------------------------------

梳理:略。

-------------------------------------------------------59-----------------------------------------------------------

ChannelHandlerContext

解释:

重新开始---sgg-netty----6-1

重新开始---sgg-netty----6-1

debuge:ctx此时这个handler就是红框。

重新开始---sgg-netty----6-1

因为是addLast所以next是没有的,但是有pre。

重新开始---sgg-netty----6-1

同时还关联了pipleline,通过pipleline拿到channnel。

重新开始---sgg-netty----6-1

api:

重新开始---sgg-netty----6-1

当前的handler。

重新开始---sgg-netty----6-1

------------------------

对于这个的解释:

重新开始---sgg-netty----6-1

重新开始---sgg-netty----6-1

---------------------------

重点:

重新开始---sgg-netty----6-1

重新开始---sgg-netty----6-1

选择是1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 NioEventLoop。

方法:

重新开始---sgg-netty----6-1

重新开始---sgg-netty----6-1

-------------------------------------------------------60-----------------------------------------------------------

相关文章:

  • 2022-01-01
  • 2022-12-23
  • 2022-12-23
  • 2021-10-14
  • 2021-06-17
  • 2022-12-23
  • 2021-05-25
猜你喜欢
  • 2021-12-25
  • 2021-04-18
  • 2021-08-06
  • 2021-08-19
  • 2021-08-23
相关资源
相似解决方案