folly::IOBuf::getIov

Get an iovector suitable for e.g. writev()

Synopsis

Declared in <folly/io/IOBuf.h>

folly::fbvector<iovec>
getIov() const;

Description

auto iov = buf->getIov(); auto xfer = writev(fd, iov.data(), iov.size());

Naturally, the returned iovector is invalid if you modify the buffer chain.

Return Value

An fbvector of iovec entries describing the chain data. methodset IOV