NIOCloseOnErrorHandler
A ChannelInboundHandler
that closes the channel when an error is caught
final class NIOCloseOnErrorHandler
A ChannelInboundHandler
that closes the channel when an error is caught
final class NIOCloseOnErrorHandler
import NIOCore
The core abstractions that make up SwiftNIO.
final class AcceptBackoffHandler
A ChannelHandler
that implements a backoff for a ServerChannel
when accept produces an IOError
. These errors are often recoverable by reducing the rate at which we call accept.
final class BackPressureHandler
ChannelHandler implementation which enforces back-pressure by stopping to read from the remote peer when it cannot write back fast enough. It will start reading again once pending data was written.
final class IdleStateHandler
Triggers an IdleStateEvent when a Channel has not performed read, write, or both operation for a while.
protocol ChannelHandler : AnyObject
Base protocol for handlers that handle I/O events or intercept an I/O operation.
protocol ChannelInboundHandler : _ChannelInboundHandler, _EmittingChannelHandler
ChannelHandler
which handles inbound I/O events for a Channel
.
protocol Sendable
protocol _ChannelInboundHandler : ChannelHandler
Untyped ChannelHandler
which handles inbound I/O events.
protocol _EmittingChannelHandler
ChannelHandler which will emit data by calling ChannelHandlerContext.write
.
init()
Initialize a NIOCloseOnErrorHandler
func errorCaught(context: ChannelHandlerContext, error: Error)
typealias InboundIn = NIOAny
func channelActive(context: ChannelHandlerContext)
func channelInactive(context: ChannelHandlerContext)
func channelRead(context: ChannelHandlerContext, data: NIOAny)
func channelReadComplete(context: ChannelHandlerContext)
func channelRegistered(context: ChannelHandlerContext)
func channelUnregistered(context: ChannelHandlerContext)
func channelWritabilityChanged(context: ChannelHandlerContext)
func handlerAdded(context: ChannelHandlerContext)
Do nothing by default.
func handlerRemoved(context: ChannelHandlerContext)
Do nothing by default.
func unwrapInboundIn(_ value: NIOAny) -> InboundIn
func userInboundEventTriggered(context: ChannelHandlerContext, event: Any)
func wrapInboundOut(_ value: InboundOut) -> NIOAny
func wrapOutboundOut(_ value: OutboundOut) -> NIOAny