IT资讯 Netty 5.0.0.Alpha3 发布

tonino · 2022-07-12 10:00:08 · 热度: 17

Netty 5.0.0.Alpha3 已发布,这是一个重要的里程碑,此版本迁移了所有代码——以使用新的Buffer API,并完全移除ByteBuf 

主要变化

  • 所有代码现在使用Buffer (新的 buffer API)
  • 移除ChannelInboundHandler
  • 移除Http2MultiplexCodecHttp2MultiplexCodecBuilder
  • Buffer, EventLoop, Future添加多个便捷的方法
  • ChannelHandlerContext不再对AttributeMap进行扩展
  • 将 half-closure 作为 Channel 的 core-concept
  • 支持双向发送 "custom" 事件
  • Remove blocking methods from Future interface, people need to use Future.asStage() to gain access to blocking methods
  • Future接口移除阻塞方法,开发者需要使用Future.asStage() 才能访问阻塞方法
  • 移除Channel.Unsafe
  • ChannelAPI 移除ChannelOutboundBuffer,作为AbstractChannel的实现细节
  • 移除@Sharable,使用ChannelHandler.isSharable()替代
  • 移除EventLoop.Unsafe,并添加EventLoop.registerForIo(...) / EventLoop.deregisterForIo(...)
  • Channel.bytesBeforeUnwritable()重命名为Channel.writableBytes()
  • 添加 ProtocolEvent 并让 SSL 和 WebSocket 实现使用它
  • 将通用逻辑移动至AbstractChannel,从而使实现更容易重用代码,还要确保重命名受保护的方法,以更加一致

详情。

为您推荐与 netty 相关的帖子:

暂无回复。
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册