Enumerationswift-nio 2.72.0NIOCore
ChannelEvent
An Channel
related event that is passed through the ChannelPipeline
to notify the user.
enum ChannelEvent
Cases
case inputClosed
ChannelOptions.allowRemoteHalfClosure
istrue
and input portion of theChannel
was closed.case outputClosed
Output portion of the
Channel
was closed.
See also
View members
Hide members
This section is hidden by default because it contains too many (12) members.
protocol Channel
A
Channel
is easiest thought of as a network socket. But it can be anything that is capable of I/O operations such as read, write, connect, and bind.protocol MulticastChannel
A
MulticastChannel
is aChannel
that supports IP multicast operations: that is, a channel that can join multicast groups.protocol ChannelHandler
Base protocol for handlers that handle I/O events or intercept an I/O operation.
protocol ChannelOutboundHandler
ChannelHandler
which handles outbound I/O events or intercept an outbound I/O operation for aChannel
.protocol ChannelInboundHandler
ChannelHandler
which handles inbound I/O events for aChannel
.typealias ChannelDuplexHandler
A combination of
ChannelInboundHandler
andChannelOutboundHandler
.class ChannelHandlerContext
Every
ChannelHandler
has – when added to aChannelPipeline
– a correspondingChannelHandlerContext
which is the wayChannelHandler
s can interact with otherChannelHandler
s in the pipeline.class ChannelPipeline
A list of
ChannelHandler
s that handle or intercept inbound events and outbound operations of aChannel
.ChannelPipeline
implements an advanced form of the Intercepting Filter pattern to give a user full control over how an event is handled and how theChannelHandler
s in a pipeline interact with each other.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.struct NIOAny
NIOAny
is an opaque container for values of any type, similar to Swift’s builtinAny
type. Contrary toAny
the overhead ofNIOAny
depends on the the type of the wrapped value. Certain types that are important for the performance of a SwiftNIO application likeByteBuffer
,FileRegion
andAddressEnvelope<ByteBuffer>
can be expected to be wrapped almost without overhead. All others will have similar performance as if they were passed as anAny
asNIOAny
just likeAny
will contain them within an existential container.enum CloseMode
Specify what kind of close operation is requested.
struct ChannelShouldQuiesceEvent
A
Channel
user event that is sent when theChannel
has been asked to quiesce.
Citizens in NIOCore
Conformances
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol Sendable
A type whose values can safely be passed across concurrency domains by copying.
Type features
static func != (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether two values are not equal.