04 2020 档案
摘要:ByteBuf释放不当容易造成内存泄漏。 一般情况下,业务handler中使用到的ByteBuf可以分为两类,请求ByteBuf和响应ByteBuf。如下: public class MyServerHandler extends SimpleChannelInboundHandler<ByteBu
阅读全文
摘要:以定长解码器为例,理清脉络。 NioEventLoop,run @Override protected void run() { int selectCnt = 0; for (;;) { //..... else if (strategy > 0) { final long ioStartTime
阅读全文
浙公网安备 33010602011771号