folly::AsyncWriter::writev

If you supply a non-null WriteCallback, exactly one of writeSuccess() or writeErr() will be invoked when the write completes. If you supply the same WriteCallback object for multiple write() calls, it will be invoked exactly once per call. The only way to cancel outstanding write requests is to close the socket (e.g., with closeNow() or shutdownWriteNow()). When closing the socket this way, writeErr() will still be invoked once for each outstanding write operation.

Synopsis

Declared in <folly/io/async/AsyncTransport.h>

virtual
void
writev(
    WriteCallback* callback,
    iovec const* vec,
    size_t count,
    WriteFlags flags = WriteFlags::NONE) = 0;

Parameters

NameDescription
callbackCallback notified when the write completes or fails.
vecArray of iovec entries describing the data to write.
countNumber of entries in vec.
flagsFlags controlling how the data is written.