Protocolswift-nio 2.72.0NIOCore
ChannelCore
The core Channel
methods that are for internal use of the Channel
implementation only.
protocol ChannelCore : AnyObject
Requirements
Instance members
func bind0(to: SocketAddress, promise: EventLoopPromise<Void>?
) Bind to a
SocketAddress
.func channelRead0(NIOAny
) Called when data was read from the
Channel
but it was not consumed by anyChannelInboundHandler
in theChannelPipeline
.func close0(error: Error, mode: CloseMode, promise: EventLoopPromise<Void>?
) Close the
Channel
.func connect0(to: SocketAddress, promise: EventLoopPromise<Void>?
) Connect to a
SocketAddress
.func errorCaught0(error: Error
) Called when an inbound error was encountered but was not consumed by any
ChannelInboundHandler
in theChannelPipeline
.func flush0(
) Try to flush out all previous written messages that are pending.
func localAddress0(
) throws -> SocketAddress Returns the local bound
SocketAddress
.func read0(
) Request that the
Channel
perform a read when data is ready.func register0(promise: EventLoopPromise<Void>?
) Register with the
EventLoop
to receive I/O notifications.func registerAlreadyConfigured0(promise: EventLoopPromise<Void>?
) Register channel as already connected or bound socket.
func remoteAddress0(
) throws -> SocketAddress Return the connected
SocketAddress
.func triggerUserOutboundEvent0(Any, promise: EventLoopPromise<Void>?
) Trigger an outbound event.
func write0(NIOAny, promise: EventLoopPromise<Void>?
) Write the given data to the outbound buffer.
See also
protocol ChannelInvoker
A protocol that signals that outbound and inbound events are triggered by this invoker.
protocol ChannelInboundInvoker
Fire inbound events related to a
Channel
through theChannelPipeline
until its end is reached or it’s consumed by aChannelHandler
.protocol ChannelOutboundInvoker
Allows users to invoke an “outbound” operation related to a
Channel
that will flow through theChannelPipeline
until it will finally be executed by the theChannelCore
implementation.
Citizens in NIOCore
Instance members
func removeHandlers(pipeline: ChannelPipeline
) Removes the
ChannelHandler
s from theChannelPipeline
pipeline
, and closes thatChannelPipeline
.func tryUnwrapData<T>(NIOAny, as: T.Type
) -> T? Attempts to unwrap the given
NIOAny
as a specific concrete type.func unwrapData<T>(NIOAny, as: T.Type
) -> T Unwraps the given
NIOAny
as a specific concrete type.
Show obsolete interfaces (1)
Hide obsolete interfaces
func removeHandlers(channel: Channel
) Removes the
ChannelHandler
s from theChannelPipeline
belonging tochannel
, and closes thatChannelPipeline
.