size_t Connection::send(BufferV &data) { if (state_ != kConnStatesConnected) { return -1; } size_t res = send(data.beginRead(), data.readableBytes()); return res; }
size_t BufferV::appendBuffer(BufferV &buffer) { char *data = buffer.beginRead(); size_t size = buffer.readableBytes(); return append(data, size); }