Instance Methodswift-nio 2.72.0NIOPosix
withConnectedSocket(descriptor:)
Use the existing connected socket file descriptor.
Bootstrap.swift:1076This declaration has been renamed to ClientBootstrap.withConnectedSocket(_:).
This declaration is deprecated.
func withConnectedSocket(descriptor: CInt) -> EventLoopFuture<Channel>
Parameters
- descriptor
The Unix file descriptor representing the connected stream socket.
Returns
an EventLoopFuture<Channel>
to deliver the Channel
.
Other members in extension
Type members
init(group: EventLoopGroup
) Create a
ClientBootstrap
on theEventLoopGroup
group
.init?(validatingGroup: EventLoopGroup
) Create a
ClientBootstrap
on theEventLoopGroup
group
, validating thatgroup
is compatible.
Instance members
func bind(to: SocketAddress
) -> ClientBootstrap Bind the
SocketChannel
toaddress
.func channelInitializer(@escaping (Channel) -> EventLoopFuture<Void>
) -> Self func channelOption<Option>(Option, value: Option.Value
) -> Self func connect(host: String, port: Int
) -> EventLoopFuture<Channel> func connect<Output>(host: String, port: Int, channelInitializer: @escaping (Channel) -> EventLoopFuture<Output>
) async throws -> Output Specify the
host
andport
to connect to for the TCPChannel
that will be established.func connect(to: VsockAddress
) -> EventLoopFuture<Channel> Specify the VSOCK address to connect to for the
Channel
.func connect(to: SocketAddress
) -> EventLoopFuture<Channel> func connect<Output>(to: SocketAddress, channelInitializer: @escaping (Channel) -> EventLoopFuture<Output>
) async throws -> Output Specify the
address
to connect to for the TCPChannel
that will be established.func connect<Output>(to: VsockAddress, channelInitializer: @escaping (Channel) -> EventLoopFuture<Output>
) async throws -> Output Specify the VSOCK address to connect to for the
Channel
.func connect(unixDomainSocketPath: String
) -> EventLoopFuture<Channel> func connect<Output>(unixDomainSocketPath: String, channelInitializer: @escaping (Channel) -> EventLoopFuture<Output>
) async throws -> Output Specify the
unixDomainSocket
path to connect to for the UDSChannel
that will be established.func connectTimeout(TimeAmount
) -> Self Specifies a timeout to apply to a connection attempt.
func enableMPTCP(Bool
) -> Self Enables multi-path TCP support.
func protocolHandlers(@escaping () -> [ChannelHandler]
) -> Self func resolver(Resolver?
) -> Self Specifies the
Resolver
to use ornil
if the default should be used.func withConnectedSocket(NIOBSDSocket.Handle
) -> EventLoopFuture<Channel> Use the existing connected socket file descriptor.
func withConnectedSocket<Output>(NIOBSDSocket.Handle, channelInitializer: @escaping (Channel) -> EventLoopFuture<Output>
) async throws -> Output Use the existing connected socket file descriptor.