超过一年的开发时间,历经 9 个 RC 版本,Netty 4.0 正式版发布!!!
如果你是 RC9 或者之前版本的用户,在升级之前还需要先看看这个变化:MessageList 移除了!
相关的改动
ChannelInboundHandler.channelReadSuspended()has been replaced bychannelReadComplete()introduced above, because they are essentially same.- Because
MessageListis gone, codec framework now usesList<Object>instead ofMessageListas an output parameter.
其他改动
UnpooledByteBufAllocatoris the default allocator. We suspect there might be a leak in thePooledByteBufAllocator. Until the investigation is complete and any bugs found are fixed, we are defaulting toUnpooledByteBufAllocator.ByteBufis now an abstract class rather than an interface. I found that convertingByteBuffrom an interface to an abstract class gives the nice performance boost of around 5%. HenceByteBufwas converted to an abstract class.Channel.id()has been removed. It was practically impossible to generate a unique ID of aChannelwith the new API because there is no way to manage the global map of the taken IDs
完整的内容请看 here
引用来自“wf2030”的评论
很喜欢netty,但是api真心是变化无常啊,messagelist貌似是才加上去不久啊,又删掉了!!!到底是要闹哪样。。。