diff options
author | 2016-01-13 12:48:56 -0800 | |
---|---|---|
committer | 2016-01-13 12:48:56 -0800 | |
commit | 16a7dee6141785092ee2aae4a11d2e9f590a1847 (patch) | |
tree | c1136c5f214dde3707a5ef4867f5957801236baa /include/grpc++/support/byte_buffer.h | |
parent | 7149ca6bd0ce73a08fa512415d3f641a06a15a75 (diff) | |
parent | 70a043855e2a01d8281b364b71cf35c5b89868da (diff) |
Merge pull request #4670 from vjpai/bbuf
Support generic (non-proto) performance testing
Diffstat (limited to 'include/grpc++/support/byte_buffer.h')
-rw-r--r-- | include/grpc++/support/byte_buffer.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/grpc++/support/byte_buffer.h b/include/grpc++/support/byte_buffer.h index 9d19b07708..d3f9b7b1d1 100644 --- a/include/grpc++/support/byte_buffer.h +++ b/include/grpc++/support/byte_buffer.h @@ -55,8 +55,14 @@ class ByteBuffer GRPC_FINAL { /// Construct buffer from \a slices, of which there are \a nslices. ByteBuffer(const Slice* slices, size_t nslices); + /// Constuct a byte buffer by referencing elements of existing buffer + /// \a buf. Wrapper of core function grpc_byte_buffer_copy + ByteBuffer(const ByteBuffer&buf); + ~ByteBuffer(); + ByteBuffer& operator=(const ByteBuffer&); + /// Dump (read) the buffer contents into \a slices. void Dump(std::vector<Slice>* slices) const; @@ -69,9 +75,6 @@ class ByteBuffer GRPC_FINAL { private: friend class SerializationTraits<ByteBuffer, void>; - ByteBuffer(const ByteBuffer&); - ByteBuffer& operator=(const ByteBuffer&); - // takes ownership void set_buffer(grpc_byte_buffer* buf) { if (buffer_) { |