ChannelHandler: provide static (un)wrap(In|Out)bound(In|Out) (#2791)

This commit is contained in:
Johannes Weiss authored and GitHub committed 2024-07-18 11:55:48 +01:00
1 parent 223b0e8eac
commit 7948ed2104
72 files changed
+369 -343

No files matched your search

+4 -4
View File
@@ -42,16 +42,16 @@ private final class HTTPEchoHandler: ChannelInboundHandler {
uri: "/dynamic/echo",
headers: headers)
context.write(self.wrapOutboundOut(.head(requestHead)), promise: nil)
context.write(Self.wrapOutboundOut(.head(requestHead)), promise: nil)
context.write(self.wrapOutboundOut(.body(.byteBuffer(buffer))), promise: nil)
context.write(Self.wrapOutboundOut(.body(.byteBuffer(buffer))), promise: nil)
context.writeAndFlush(self.wrapOutboundOut(.end(nil)), promise: nil)
context.writeAndFlush(Self.wrapOutboundOut(.end(nil)), promise: nil)
}
public func channelRead(context: ChannelHandlerContext, data: NIOAny) {
let clientResponse = self.unwrapInboundIn(data)
let clientResponse = Self.unwrapInboundIn(data)
switch clientResponse {
case .head(let responseHead):