protocol Channel : AnyObject, ChannelOutboundInvoker, _NIOPreconcurrencySendable
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.
func bind<Output>(_ socket: NIOBSDSocket.Handle, cleanupExistingSocketFile: Bool = false, serverBackPressureStrategy: NIOAsyncSequenceProducerBackPressureStrategies.HighLowWatermark? = nil, childChannelInitializer: @escaping (Channel) -> EventLoopFuture<Output>) async throws -> NIOAsyncChannel<Output, Never> where Output : Sendable
Use the existing bound socket file descriptor.
func bind<Output>(host: String, port: Int, serverBackPressureStrategy: NIOAsyncSequenceProducerBackPressureStrategies.HighLowWatermark? = nil, childChannelInitializer: @escaping (Channel) -> EventLoopFuture<Output>) async throws -> NIOAsyncChannel<Output, Never> where Output : Sendable
Bind the ServerSocketChannel
to the host
and port
parameters.
func bind<Output>(to vsockAddress: VsockAddress, serverBackPressureStrategy: NIOAsyncSequenceProducerBackPressureStrategies.HighLowWatermark? = nil, childChannelInitializer: @escaping (Channel) -> EventLoopFuture<Output>) async throws -> NIOAsyncChannel<Output, Never> where Output : Sendable
Bind the ServerSocketChannel
to a VSOCK socket.
func bind<Output>(to address: SocketAddress, serverBackPressureStrategy: NIOAsyncSequenceProducerBackPressureStrategies.HighLowWatermark? = nil, childChannelInitializer: @escaping (Channel) -> EventLoopFuture<Output>) async throws -> NIOAsyncChannel<Output, Never> where Output : Sendable
Bind the ServerSocketChannel
to the address
parameter.
func bind<Output>(unixDomainSocketPath: String, cleanupExistingSocketFile: Bool = false, serverBackPressureStrategy: NIOAsyncSequenceProducerBackPressureStrategies.HighLowWatermark? = nil, childChannelInitializer: @escaping (Channel) -> EventLoopFuture<Output>) async throws -> NIOAsyncChannel<Output, Never> where Output : Sendable
Bind the ServerSocketChannel
to a UNIX Domain Socket.