Instance Methodswift-nio 2.72.0NIOCore
connect(host:port:)
Specify the host
and port
to connect to for the TCP Channel
that will be established.
func connect(host: String, port: Int) -> EventLoopFuture<Channel>
Parameters
Returns
An EventLoopFuture<Channel>
to deliver the Channel
when connected.
Other members in extension
Type members
init<Bootstrap, TLS>(Bootstrap, tls: TLS
) Initialize a
NIOClientTCPBootstrap
using the underlyingBootstrap
alongside a compatibleTLS
implementation.
Instance members
let underlyingBootstrap: NIOClientTCPBootstrapProtocol
func channelConvenienceOptions(ChannelOptions.TCPConvenienceOptions
) -> NIOClientTCPBootstrap Specifies some
TCPConvenienceOption
s to be applied to the channel. These are preferred over regular channel options as they are easier to use and restrict options to those which a normal user would consider.func channelInitializer(@escaping (Channel) -> EventLoopFuture<Void>
) -> NIOClientTCPBootstrap Initialize the connected
SocketChannel
withinitializer
. The most common task in initializer is to addChannelHandler
s to theChannelPipeline
.func channelOption<Option>(Option, value: Option.Value
) -> NIOClientTCPBootstrap Specifies a
ChannelOption
to be applied to theSocketChannel
.func connect(to: SocketAddress
) -> EventLoopFuture<Channel> Specify the
address
to connect to for the TCPChannel
that will be established.func connect(unixDomainSocketPath: String
) -> EventLoopFuture<Channel> Specify the
unixDomainSocket
path to connect to for the UDSChannel
that will be established.func connectTimeout(TimeAmount
) -> NIOClientTCPBootstrap func enableTLS(
) -> NIOClientTCPBootstrap