Instance Methodswift-nio 2.72.0NIOCore
writeAndFlush(_:file:line:)
Shortcut for calling write
and flush
.
func writeAndFlush(_ data: NIOAny, file: StaticString = #fileID, line: UInt = #line) -> EventLoopFuture<Void>
Parameters
- data
the data to write
Returns
the future which will be notified once the write
operation completes.
Other members in extension
Instance members
func bind(to: SocketAddress, file: StaticString, line: UInt
) -> EventLoopFuture<Void> Bind to a
SocketAddress
.func bind(to: SocketAddress, file: StaticString, line: UInt
) async throws Bind to a
SocketAddress
.func close(mode: CloseMode, file: StaticString, line: UInt
) -> EventLoopFuture<Void> Close the
Channel
and so the connection if one exists.func close(mode: CloseMode, file: StaticString, line: UInt
) async throws Close the
Channel
and so the connection if one exists.func connect(to: SocketAddress, file: StaticString, line: UInt
) -> EventLoopFuture<Void> Connect to a
SocketAddress
.func connect(to: SocketAddress, file: StaticString, line: UInt
) async throws Connect to a
SocketAddress
.func register(file: StaticString, line: UInt
) -> EventLoopFuture<Void> Register on an
EventLoop
and so have all its IO handled.func register(file: StaticString, line: UInt
) async throws Register on an
EventLoop
and so have all its IO handled.func triggerUserOutboundEvent(Any, file: StaticString, line: UInt
) -> EventLoopFuture<Void> Trigger a custom user outbound event which will flow through the
ChannelPipeline
.func triggerUserOutboundEvent(Any, file: StaticString, line: UInt
) async throws Trigger a custom user outbound event which will flow through the
ChannelPipeline
.func write(NIOAny, file: StaticString, line: UInt
) -> EventLoopFuture<Void> Write data to the remote peer.
func writeAndFlush(NIOAny, file: StaticString, line: UInt
) async throws Shortcut for calling
write
andflush
.