ChannelOptions
Provides ChannelOption
s to be used with a Channel
, Bootstrap
or ServerBootstrap
.
struct ChannelOptions
Provides ChannelOption
s to be used with a Channel
, Bootstrap
or ServerBootstrap
.
struct ChannelOptions
import NIOCore
The core abstractions that make up SwiftNIO.
protocol ChannelOption : _NIOPreconcurrencySendable, Equatable
A configuration option that can be set on a Channel
to configure different behaviour.
protocol NIOSynchronousChannelOptions
protocol SocketOptionProvider : _NIOPreconcurrencySendable
This protocol defines an object, most commonly a Channel
, that supports setting and getting socket options (via setsockopt
/getsockopt
or similar). It provides a strongly typed API that makes working with larger, less-common socket options easier than the ChannelOption
API allows.
protocol RecvByteBufferAllocator : _NIOPreconcurrencySendable
Allocates ByteBuffer
s to be used to read bytes from a Channel
and records the number of the actual bytes that were used.
struct AdaptiveRecvByteBufferAllocator
RecvByteBufferAllocator
which will gracefully increment or decrement the buffer size on the feedback that was recorded.
struct FixedSizeRecvByteBufferAllocator
RecvByteBufferAllocator
which will always return a ByteBuffer
with the same fixed size no matter what was recorded.
typealias AllocatorOption = ChannelOptions.Types.AllocatorOption
typealias AllowRemoteHalfClosureOption = ChannelOptions.Types.AllowRemoteHalfClosureOption
typealias AutoReadOption = ChannelOptions.Types.AutoReadOption
typealias BacklogOption = ChannelOptions.Types.BacklogOption
typealias ConnectTimeoutOption = ChannelOptions.Types.ConnectTimeoutOption
typealias DatagramVectorReadMessageCountOption = ChannelOptions.Types.DatagramVectorReadMessageCountOption
typealias MaxMessagesPerReadOption = ChannelOptions.Types.MaxMessagesPerReadOption
typealias RecvAllocatorOption = ChannelOptions.Types.RecvAllocatorOption
typealias SocketOption = ChannelOptions.Types.SocketOption
typealias SocketOptionLevel = Int
typealias SocketOptionName = Int32
typealias SocketOptionValue = Int
typealias WriteBufferWaterMarkOption = ChannelOptions.Types.WriteBufferWaterMarkOption
typealias WriteBufferWaterMark = ChannelOptions.Types.WriteBufferWaterMark
typealias WriteSpinOption = ChannelOptions.Types.WriteSpinOption
protocol Sendable
static let allocator: ChannelOptions.Types.AllocatorOption
static let allowRemoteHalfClosure: ChannelOptions.Types.AllowRemoteHalfClosureOption
static let autoRead: ChannelOptions.Types.AutoReadOption
static let backlog: ChannelOptions.Types.BacklogOption
static let bufferedWritableBytes: ChannelOptions.Types.BufferedWritableBytesOption
static let connectTimeout: ChannelOptions.Types.ConnectTimeoutOption
static let datagramReceiveOffload: ChannelOptions.Types.DatagramReceiveOffload
static let datagramSegmentSize: ChannelOptions.Types.DatagramSegmentSize
static let datagramVectorReadMessageCount: ChannelOptions.Types.DatagramVectorReadMessageCountOption
static let explicitCongestionNotification: ChannelOptions.Types.ExplicitCongestionNotificationsOption
static let ipOption: (NIOBSDSocket.Option) -> ChannelOptions.Types.SocketOption
static let maxMessagesPerRead: ChannelOptions.Types.MaxMessagesPerReadOption
static let receivePacketInfo: ChannelOptions.Types.ReceivePacketInfo
static let recvAllocator: ChannelOptions.Types.RecvAllocatorOption
static let socket: (SocketOptionLevel, SocketOptionName) -> ChannelOptions.Types.SocketOption
static let socketOption: (NIOBSDSocket.Option) -> ChannelOptions.Types.SocketOption
static let tcpOption: (NIOBSDSocket.Option) -> ChannelOptions.Types.SocketOption
static let writeBufferWaterMark: ChannelOptions.Types.WriteBufferWaterMarkOption
static let writeSpin: ChannelOptions.Types.WriteSpinOption
struct Storage
A type-safe storage facility for ChannelOption
s. You will only ever need this if you implement your own Channel
that needs to store ChannelOption
s.
struct TCPConvenienceOption
A TCP channel option which can be applied to a bootstrap using convenience notation.
struct TCPConvenienceOptions
A set of TCPConvenienceOption
s
enum Types
import NIOPosix
static let localVsockContextID: ChannelOptions.Types.LocalVsockContextID