HTTPUserEventHandler
HTTPUserEventHandler.swift:19final class HTTPUserEventHandler
Citizens in HummingbirdCore
Conformances
protocol ChannelHandler
Base protocol for handlers that handle I/O events or intercept an I/O operation.
protocol ChannelInboundHandler
ChannelHandler
which handles inbound I/O events for aChannel
.protocol ChannelOutboundHandler
ChannelHandler
which handles outbound I/O events or intercept an outbound I/O operation for aChannel
.protocol RemovableChannelHandler
A
RemovableChannelHandler
is aChannelHandler
that can be dynamically removed from aChannelPipeline
whilst theChannel
is operating normally. ARemovableChannelHandler
is required to remove itself from theChannelPipeline
(usingChannelHandlerContext.leavePipeline
) as soon as possible.
Show implementation details (3)
Hide implementation details
protocol _ChannelInboundHandler
Untyped
ChannelHandler
which handles inbound I/O events.protocol _ChannelOutboundHandler
Untyped
ChannelHandler
which handles outbound I/O events or intercept an outbound I/O operation.protocol _EmittingChannelHandler
ChannelHandler which will emit data by calling
ChannelHandlerContext.write
.
Typealiases
Type members
Instance members
func channelRead(context: ChannelHandlerContext, data: NIOAny
) func userInboundEventTriggered(context: ChannelHandlerContext, event: Any
) func write(context: ChannelHandlerContext, data: NIOAny, promise: EventLoopPromise<Void>?
)
Instance features
func bind(context: ChannelHandlerContext, to: SocketAddress, promise: EventLoopPromise<Void>?
) func channelActive(context: ChannelHandlerContext
) func channelInactive(context: ChannelHandlerContext
) func channelReadComplete(context: ChannelHandlerContext
) func channelRegistered(context: ChannelHandlerContext
) func channelUnregistered(context: ChannelHandlerContext
) func channelWritabilityChanged(context: ChannelHandlerContext
) func close(context: ChannelHandlerContext, mode: CloseMode, promise: EventLoopPromise<Void>?
) func connect(context: ChannelHandlerContext, to: SocketAddress, promise: EventLoopPromise<Void>?
) func errorCaught(context: ChannelHandlerContext, error: Error
) func flush(context: ChannelHandlerContext
) func handlerAdded(context: ChannelHandlerContext
) Do nothing by default.
func handlerRemoved(context: ChannelHandlerContext
) Do nothing by default.
func read(context: ChannelHandlerContext
) func register(context: ChannelHandlerContext, promise: EventLoopPromise<Void>?
) func removeHandler(context: ChannelHandlerContext, removalToken: ChannelHandlerContext.RemovalToken
) Implements the default behaviour which is to synchronously remove the handler from the pipeline. Thanks to this, stateless
ChannelHandler
s can just useRemovableChannelHandler
as a marker-protocol and declare themselves as removable without writing any extra code.func triggerUserOutboundEvent(context: ChannelHandlerContext, event: Any, promise: EventLoopPromise<Void>?
) func unwrapInboundIn(NIOAny
) -> InboundIn func unwrapOutboundIn(NIOAny
) -> OutboundIn func wrapInboundOut(InboundOut
) -> NIOAny func wrapOutboundOut(OutboundOut
) -> NIOAny