【发布时间】:2019-05-03 13:10:31
【问题描述】:
有没有办法在请求处理程序中获取 Reactor Netty 中使用的 ByteBuf 分配器?类似于在纯 Netty 中如何做到final ByteBufAllocator byteBufAllocator = ctx.alloc();?
HttpServer.create()
.host("0.0.0.0")
.port(8080)
.route(routes -> {
routes.ws("/ws", (in, out) ->
// how to get the allocator here?
});
})
【问题讨论】:
-
请指定服务器或客户端,您想在哪个阶段获取。
-
感谢您的评论,澄清了问题。
标签: project-reactor reactor-netty