A combination of
Common errors thrown by
An error that can occur on
Channel related event that is passed through the
ChannelPipeline to notify the user.
Error that is used by the
ChannelPipeline to inform the user of an error.
Specify what kind of close operation is requested.
State of the current decoding process.
Endianness refers to the sequential order in which bytes are arranged into larger numerical values when stored in memory or when transmitted over digital links.
Errors that are specific to
EventLoop operations / implementations.
IOData unifies standard SwiftNIO types that are raw bytes of data; currently
This type is intended to be used by libraries which use NIO, and offer their users either the option to
.share an existing event loop group or create (and manage) a new one (
.createNew) and let it be managed by given library and its lifecycle.
Possible Explicit Congestion Notification States
Represent a socket address to which we may want to connect or bind.
Error that may be thrown if we fail to create a
RecvByteBufferAllocator which will gracefully increment or decrement the buffer size on the feedback that was recorded.
A data structure for processing addressed datagrams, such as those used by UDP.
ByteBuffer stores contiguously allocated raw bytes. It is a random and sequential accessible sequence of zero or more bytes (octets).
The preferred allocator for
ByteBuffer values. The allocation strategy is opaque but is currently libc’s
A view into a portion of a
ChannelOptions to be used with a
Channel user event that is sent when the
Channel has been asked to quiesce.
An automatically expanding ring buffer implementation backed by a
ContiguousArray. Even though this implementation will automatically expand if more elements than
initialCapacity are stored, it’s advantageous to prevent expansions from happening frequently. Expansions will always force an allocation and a copy to happen.
An iterator over the
EventLoops forming an
A promise to provide a result later.
FileRegion represent a readable portion usually created to be sent over the network.
RecvByteBufferAllocator which will always return a
ByteBuffer with the same fixed size no matter what was recorded.
Error for an IO operation.
A circular buffer that allows one object at a time to be “marked” and easily identified and retrieved later.
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
AddressEnvelope<ByteBuffer> can be expected to be wrapped almost without overhead. All others will have similar performance as if they were passed as an
NIOAny just like
Any will contain them within an existential container.
The removal of a
ChannelPipeline.removeHandler has been attempted more than once.
NIOClientTCPBootstrap is a bootstrap that allows you to bootstrap client TCP connections using NIO on BSD Sockets, NIO Transport Services, or other ways.
Represents a point in time.
Multicast has not been properly implemented on this channel.
Multicast is not supported on this interface.
A representation of a single network device on a system.
Returned once a task was scheduled on the
EventLoop for later execution.
Represents a time interval.
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.
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.
A handler which turns a given
ByteToMessageDecoder into a
ChannelInboundHandler that can then be added to a
ChannelHandler has – when added to a
ChannelPipeline – a corresponding
ChannelHandlerContext which is the way
ChannelHandlers can interact with other
ChannelHandlers in the pipeline.
A list of
ChannelHandlers that handle or intercept inbound events and outbound operations of a
ChannelPipeline implements an advanced form of the Intercepting Filter pattern to give a user full control over how an event is handled and how the
ChannelHandlers in a pipeline interact with each other.
Holder for a result that will be provided later.
Triggers an IdleStateEvent when a Channel has not performed read, write, or both operation for a while.
A handler which turns a given
MessageToByteEncoder into a
ChannelOutboundHandler that can then be added to a
ChannelInboundHandler that closes the channel when an error is caught
NIOFileHandle is a handle to an open file.
NIOSingleStepByteToMessageProcessor uses a
NIOSingleStepByteToMessageDecoder to produce messages from a stream of incoming bytes. It works like
ByteToMessageHandler but may be used outside of the channel pipeline. This allows processing of wrapped protocols in a general way.
Returned once a task was scheduled to be repeatedly executed on the
ByteToMessageDecoders decode bytes in a stream-like fashion from
ByteBuffer to another message type.
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.
Channel methods that are for internal use of the
Channel implementation only.
You should never implement this protocol directly. Please implement one of its sub-protocols.
ChannelHandler which handles inbound I/O events for a
Fire inbound events related to a
Channel through the
ChannelPipeline until its end is reached or it’s consumed by a
A protocol that signals that outbound and inbound events are triggered by this invoker.
A configuration option that can be set on a
Channel to configure different behaviour.
ChannelHandler which handles outbound I/O events or intercept an outbound I/O operation for a
Allows users to invoke an “outbound” operation related to a
Channel that will flow through the
ChannelPipeline until it will finally be executed by the the
An EventLoop processes IO / tasks in an endless loop for
Channels until it’s closed.
Provides an endless stream of
EventLoops to use.
A protocol for straightforward encoders which encode custom messages to
ByteBuffers. To add a
MessageToByteEncoder to a
MulticastChannel is a
Channel that supports IP multicast operations: that is, a channel that can join multicast groups.
NIOClientTCPBootstrapProtocol is implemented by various underlying transport mechanisms. Typically, this will be the BSD Sockets API implemented by
A simplified version of
ByteToMessageDecoder that can generate zero or one messages for each invocation of
decodeLast return an optional message avoids re-entrancy problems, since the functions relinquish exclusive access to the
ByteBuffer when returning. This allows for greatly simplified processing.
ByteBuffers to be used to read bytes from a
Channel and records the number of the actual bytes that were used.
RemovableChannelHandler is a
ChannelHandler that can be dynamically removed from a
ChannelPipeline whilst the
Channel is operating normally. A
RemovableChannelHandler is required to remove itself from the
ChannelHandlerContext.removeHandler) as soon as possible.
This protocol defines an object, most commonly a
Channel, that supports setting and getting socket options (via
getsockopt or similar). It provides a strongly typed API that makes working with larger, less-common socket options easier than the
ChannelOption API allows.
ByteToMessageDecoders need to observe
writes (which are outbound events).
ByteToMessageDecoders which implement the
WriteObservingByteToMessageDecoder protocol will be notified about every outbound write.
A representation of a single network interface on a system.