Instance Methodswift-nio 2.72.0NIOPosix
bind(unixDomainSocketPath:cleanupExistingSocketFile:)
Bind the ServerSocketChannel
to a UNIX Domain Socket.
func bind(unixDomainSocketPath: String, cleanupExistingSocketFile: Bool) -> EventLoopFuture<Channel>
Parameters
- unixDomainSocketPath
The path of the UNIX Domain Socket to bind on. The
unixDomainSocketPath
must not exist, unlesscleanupExistingSocketFile
is set totrue
.- cleanupExistingSocketFile
Whether to cleanup an existing socket file at
unixDomainSocketPath
.
Other members in extension
Type members
init(group: EventLoopGroup
) Create a
ServerBootstrap
on theEventLoopGroup
group
.init(group: EventLoopGroup, childGroup: EventLoopGroup
) Create a
ServerBootstrap
on theEventLoopGroup
group
which acceptsChannel
s onchildGroup
.init?(validatingGroup: EventLoopGroup, childGroup: EventLoopGroup?
) Create a
ServerBootstrap
on theEventLoopGroup
group
which acceptsChannel
s onchildGroup
, validating that theEventLoopGroup
s are compatible withServerBootstrap
.
Instance members
func bind<Output>(NIOBSDSocket.Handle, cleanupExistingSocketFile: Bool, serverBackPressureStrategy: NIOAsyncSequenceProducerBackPressureStrategies.HighLowWatermark?, childChannelInitializer: @escaping (Channel) -> EventLoopFuture<Output>
) async throws -> NIOAsyncChannel<Output, Never> Use the existing bound socket file descriptor.
func bind(host: String, port: Int
) -> EventLoopFuture<Channel> Bind the
ServerSocketChannel
tohost
andport
.func bind<Output>(host: String, port: Int, serverBackPressureStrategy: NIOAsyncSequenceProducerBackPressureStrategies.HighLowWatermark?, childChannelInitializer: @escaping (Channel) -> EventLoopFuture<Output>
) async throws -> NIOAsyncChannel<Output, Never> Bind the
ServerSocketChannel
to thehost
andport
parameters.func bind(to: VsockAddress
) -> EventLoopFuture<Channel> Bind the
ServerSocketChannel
to a VSOCK socket.func bind(to: SocketAddress
) -> EventLoopFuture<Channel> Bind the
ServerSocketChannel
toaddress
.func bind<Output>(to: VsockAddress, serverBackPressureStrategy: NIOAsyncSequenceProducerBackPressureStrategies.HighLowWatermark?, childChannelInitializer: @escaping (Channel) -> EventLoopFuture<Output>
) async throws -> NIOAsyncChannel<Output, Never> Bind the
ServerSocketChannel
to a VSOCK socket.func bind<Output>(to: SocketAddress, serverBackPressureStrategy: NIOAsyncSequenceProducerBackPressureStrategies.HighLowWatermark?, childChannelInitializer: @escaping (Channel) -> EventLoopFuture<Output>
) async throws -> NIOAsyncChannel<Output, Never> Bind the
ServerSocketChannel
to theaddress
parameter.func bind(unixDomainSocketPath: String
) -> EventLoopFuture<Channel> Bind the
ServerSocketChannel
to a UNIX Domain Socket.func bind<Output>(unixDomainSocketPath: String, cleanupExistingSocketFile: Bool, serverBackPressureStrategy: NIOAsyncSequenceProducerBackPressureStrategies.HighLowWatermark?, childChannelInitializer: @escaping (Channel) -> EventLoopFuture<Output>
) async throws -> NIOAsyncChannel<Output, Never> Bind the
ServerSocketChannel
to a UNIX Domain Socket.func bindTimeout(TimeAmount
) -> Self Specifies a timeout to apply to a bind attempt. Currently unsupported.
func childChannelInitializer(@escaping (Channel) -> EventLoopFuture<Void>
) -> Self Initialize the accepted
SocketChannel
s withinitializer
. The most common task in initializer is to addChannelHandler
s to theChannelPipeline
. Note that if theinitializer
fails then the error will be fired in the parent channel.func childChannelOption<Option>(Option, value: Option.Value
) -> Self Specifies a
ChannelOption
to be applied to the acceptedSocketChannel
s.func enableMPTCP(Bool
) -> Self Enables multi-path TCP support.
func serverChannelInitializer(@escaping (Channel) -> EventLoopFuture<Void>
) -> Self Initialize the
ServerSocketChannel
withinitializer
. The most common task in initializer is to addChannelHandler
s to theChannelPipeline
.func serverChannelOption<Option>(Option, value: Option.Value
) -> Self Specifies a
ChannelOption
to be applied to theServerSocketChannel
.func withBoundSocket(NIOBSDSocket.Handle
) -> EventLoopFuture<Channel> Use the existing bound socket file descriptor.
Show obsolete interfaces (1)
Hide obsolete interfaces
func withBoundSocket(descriptor: CInt
) -> EventLoopFuture<Channel> Use the existing bound socket file descriptor.