超过一年的开发时间,历经 9 个 RC 版本,Netty 4.0 正式版发布!!!
如果你是 RC9 或者之前版本的用户,在升级之前还需要先看看这个变化:MessageList 移除了!
相关的改动
ChannelInboundHandler.channelReadSuspended() has been replaced by channelReadComplete() introduced above, because they are essentially same.
Because MessageList is gone, codec framework now uses List
instead of MessageList as an output parameter.
其他改动
UnpooledByteBufAllocator is the default allocator. We suspect there might be a leak in the PooledByteBufAllocator. Until the investigation is complete and any bugs found are fixed, we are defaulting to UnpooledByteBufAllocator.
ByteBuf is now an abstract class rather than an interface. I found that converting ByteBuf from an interface to an abstract class gives the nice performance boost of around 5%. Hence ByteBuf was converted to an abstract class.
Channel.id() has been removed. It was practically impossible to generate a unique ID of a Channel with the new API because there is no way to manage the global map of the taken IDs
官方首页:https://github.com/netty/netty/issues?milestone=42&state=closed
免费下载:https://github.com/netty/netty
来自:开源中国社区