wrapInboundOut(_:)
TypeAssistedChannelHandler.swift:67func wrapInboundOut(_ value: InboundOut) -> NIOAny
func wrapInboundOut(_ value: InboundOut) -> NIOAny
s7NIOCore21ChannelInboundHandlerPAAE04wrapC3OutyAA6NIOAnyV0cF0QzF
What are these?5NOKH
import NIOCore
The core abstractions that make up SwiftNIO.
protocol ChannelInboundHandler : _ChannelInboundHandler, _EmittingChannelHandler
ChannelHandler
which handles inbound I/O events for a Channel
.
associatedtype InboundOut = Never
The type of the inbound data which will be forwarded to the next ChannelInboundHandler
in the ChannelPipeline
.
struct NIOAny
NIOAny
is an opaque container for values of any type, similar to Swift’s builtin Any
type. Contrary to Any
the overhead of NIOAny
depends on the the type of the wrapped value. Certain types that are important for the performance of a SwiftNIO application like ByteBuffer
, FileRegion
and AddressEnvelope<ByteBuffer>
can be expected to be wrapped almost without overhead. All others will have similar performance as if they were passed as an Any
as NIOAny
just like Any
will contain them within an existential container.
func wrapInboundOut(_ value: InboundOut) -> NIOAny
Wrap the provided InboundOut
that will be passed to the next ChannelInboundHandler
by calling ChannelHandlerContext.fireChannelRead
.
static func unwrapInboundIn(_ value: NIOAny) -> InboundIn
static func wrapInboundOut(_ value: InboundOut) -> NIOAny
func unwrapInboundIn(_ value: NIOAny) -> InboundIn