NIOSynchronousChannelOptions
Channel.swift:187protocol NIOSynchronousChannelOptions
Browse conforming typesprotocol NIOSynchronousChannelOptions
import NIOCore
The core abstractions that make up SwiftNIO.
func getOption<Option>(_ option: Option) throws -> Option.Value where Option : ChannelOption
Get the value of option
for this Channel
.
func setOption<Option>(_ option: Option, value: Option.Value) throws where Option : ChannelOption
Set option
to value
on this Channel
.
protocol ChannelOption : _NIOPreconcurrencySendable, Equatable
A configuration option that can be set on a Channel
to configure different behaviour.
struct ChannelOptions
Provides ChannelOption
s to be used with a Channel
, Bootstrap
or ServerBootstrap
.
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