write(_:file:line:)
Write data to the remote peer.
This declaration is deprecated: NIOAny is not Sendable. Avoid wrapping the value in NIOAny to silence this warning.
func write(_ data: NIOAny, file: StaticString = #fileID, line: UInt = #line) -> EventLoopFuture<Void>
Parameters
Returns
the future which will be notified once the operation completes.
Be aware that to be sure that data is really written to the remote peer you need to call flush
or use writeAndFlush
. Calling write
multiple times and then flush
may allow the Channel
to write
multiple data objects to the remote peer with one syscall.