Required Instance Methodswift-nio 2.72.0NIOCore
connectTimeout(_:)
UniversalBootstrapSupport.swift:63func connectTimeout(_ timeout: TimeAmount) -> Self
Parameters
- timeout
The timeout that will apply to the connection attempt.
Other requirements
Instance members
func channelInitializer(@escaping (Channel) -> EventLoopFuture<Void>
) -> Self Initialize the connected
SocketChannel
withinitializer
. The most common task in initializer is to addChannelHandler
s to theChannelPipeline
.func channelOption<Option>(Option, value: Option.Value
) -> Self Specifies a
ChannelOption
to be applied to theSocketChannel
.func connect(host: String, port: Int
) -> EventLoopFuture<Channel> Specify the
host
andport
to connect to for the TCPChannel
that will be established.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 protocolHandlers(@escaping () -> [ChannelHandler]
) -> Self Sets the protocol handlers that will be added to the front of the
ChannelPipeline
right after thechannelInitializer
has been called.
Show implementation details (1)
Hide implementation details
func _applyChannelConvenienceOptions(inout ChannelOptions.TCPConvenienceOptions
) -> Self Apply any understood convenience options to the bootstrap, removing them from the set of options if they are consumed. Method is optional to implement and should never be directly called by users.