IOBuf::getIov
authorHans Fugal <fugalh@fb.com>
Thu, 14 Mar 2013 00:32:00 +0000 (17:32 -0700)
committerOwen Yamauchi <oyamauchi@fb.com>
Wed, 27 Mar 2013 21:39:16 +0000 (14:39 -0700)
commit51f6dea4137433b6b535f3d3348a625a5ca6c240
treea97c2d69c0d7927877f9447d6015e50fd1b42ed2
parent33a4bac623aab0fa4ea5e980fbb08b3766c40c98
IOBuf::getIov

Summary:
Generate an `fbvector` of `struct iovec` suitable for using with `writev` or
`sendmsg`.

This code is pretty straightforward, but Adam pointed out that something along
these lines has already been done in thrift, so I followed that code closely.
http://fburl.com/11586814

Test Plan:
fbmake runtests

I am using also this in a prototype and it's working there.

Reviewed By: agartrell@fb.com

FB internal diff: D744055
folly/io/IOBuf.cpp
folly/io/IOBuf.h
folly/io/test/IOBufTest.cpp