func channelRead()

in UniversalBootstrapDemo/Sources/UniversalBootstrapDemo/ExampleHTTPLibrary.swift [39:50]


            func channelRead(context: ChannelHandlerContext, data: NIOAny) {
                switch self.unwrapInboundIn(data) {
                case .head:
                    () // ignore
                case .body(let buffer):
                    buffer.withUnsafeReadableBytes { ptr in
                        _ = write(STDOUT_FILENO, ptr.baseAddress, ptr.count)
                    }
                case .end:
                    context.close(promise: nil)
                }
            }