This patch adds a Comm::Write API for accepting SBuf output buffers.
Unlike the MemBuf API it does not deallocate the backing store once written.
Unlike the char* API the buffer can be appended to before write(2) is
completed and the appended bytes will be handled as part of the original
write request.
All other behaviour is identical between the three Comm::Write APIs.
To get it in action and tested the main tunnel.cc I/O
"data pipe" buffers are converted to SBuf. Initial testing with a few
hundred CONNECT requests in real traffic shows no issues. We even get
rid of one potential data copy when passing the initial client read
buffer in from ConnStateData.
NP: at this point no effort is made to take advantage of the
early-append possibility.
The buffers behind the setup request/response handling are also left as
MemBuf due to HttpMsg::parse() and packerToMemInit() APIs missing SBuf
support.
Amos
This archive was generated by hypermail 2.2.0 : Tue May 13 2014 - 12:00:13 MDT