聚合全网技术文章,根据你的阅读喜好进行个性推荐
Netty 5.0.0.Alpha3 已发布,这是一个重要的里程碑,此版本迁移了所有代码——以使用新的Buffer API,并完全移除ByteBuf。
Buffer
ByteBuf
主要变化
ChannelInboundHandler
Http2MultiplexCodec
Http2MultiplexCodecBuilder
EventLoop
Future
ChannelHandlerContext
AttributeMap
Future.asStage()
Channel.Unsafe
Channel
ChannelOutboundBuffer
AbstractChannel
@Sharable
ChannelHandler.isSharable()
EventLoop.Unsafe
EventLoop.registerForIo(...)
EventLoop.deregisterForIo(...)
Channel.bytesBeforeUnwritable()
Channel.writableBytes()
详情。
评论删除后,数据将无法恢复
Netty 5.0.0.Alpha3 发布
Netty 5.0.0.Alpha3 已发布,这是一个重要的里程碑,此版本迁移了所有代码——以使用新的
Buffer
API,并完全移除ByteBuf
。主要变化
Buffer
(新的 buffer API)ChannelInboundHandler
Http2MultiplexCodec
和Http2MultiplexCodecBuilder
Buffer
,EventLoop
,Future
添加多个便捷的方法ChannelHandlerContext
不再对AttributeMap
进行扩展Future
interface, people need to useFuture.asStage()
to gain access to blocking methodsFuture
接口移除阻塞方法,开发者需要使用Future.asStage()
才能访问阻塞方法Channel.Unsafe
Channel
API 移除ChannelOutboundBuffer
,作为AbstractChannel
的实现细节@Sharable
,使用ChannelHandler.isSharable()
替代EventLoop.Unsafe
,并添加EventLoop.registerForIo(...)
/EventLoop.deregisterForIo(...)
Channel.bytesBeforeUnwritable()
重命名为Channel.writableBytes()
AbstractChannel
,从而使实现更容易重用代码,还要确保重命名受保护的方法,以更加一致详情。