AdaptiveRecvByteBufferAllocator
RecvByteBufferAllocator
which will gracefully increment or decrement the buffer size on the feedback that was recorded.
struct AdaptiveRecvByteBufferAllocator
RecvByteBufferAllocator
which will gracefully increment or decrement the buffer size on the feedback that was recorded.
struct AdaptiveRecvByteBufferAllocator
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
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 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
@preconcurrency protocol _NIOPreconcurrencySendable : Sendable
init()
init(minimum: Int, initial: Int, maximum: Int)
let initial: Int
let maximum: Int
let minimum: Int
func buffer(allocator: ByteBufferAllocator) -> ByteBuffer
func nextBufferSize() -> Int?
mutating func record(actualReadBytes: Int) -> Bool