04 2020 档案

摘要:ByteBuf释放不当容易造成内存泄漏。 一般情况下,业务handler中使用到的ByteBuf可以分为两类,请求ByteBuf和响应ByteBuf。如下: public class MyServerHandler extends SimpleChannelInboundHandler<ByteBu 阅读全文
posted @ 2020-04-23 17:53 Allen没有青春 阅读(2190) 评论(0) 推荐(1)
摘要:以定长解码器为例,理清脉络。 NioEventLoop,run @Override protected void run() { int selectCnt = 0; for (;;) { //..... else if (strategy > 0) { final long ioStartTime 阅读全文
posted @ 2020-04-02 19:33 Allen没有青春 阅读(328) 评论(0) 推荐(0)