Required Instance Methodswift-nio 2.72.0NIOCore
connect(to:promise:)
Connect to a SocketAddress
.
func connect(to: SocketAddress, promise: EventLoopPromise<Void>?)
Parameters
Other requirements
View members
Hide members
This section is hidden by default because it contains too many (9) members.
Instance members
var eventLoop: EventLoop
The
EventLoop
which is used by thisChannelOutboundInvoker
for execution.func bind(to: SocketAddress, promise: EventLoopPromise<Void>?
) Bind to a
SocketAddress
.func close(mode: CloseMode, promise: EventLoopPromise<Void>?
) Close the
Channel
and so the connection if one exists.func flush(
) Flush data that was previously written via
write
to the remote peer.func read(
) Signal that we want to read from the
Channel
once there is data ready.func register(promise: EventLoopPromise<Void>?
) Register on an
EventLoop
and so have all its IO handled.func triggerUserOutboundEvent(Any, promise: EventLoopPromise<Void>?
) Trigger a custom user outbound event which will flow through the
ChannelPipeline
.func write(NIOAny, promise: EventLoopPromise<Void>?
) Write data to the remote peer.
func writeAndFlush(NIOAny, promise: EventLoopPromise<Void>?
) Shortcut for calling
write
andflush
.