19 #ifndef GRPCXX_SUPPORT_BYTE_BUFFER_H
20 #define GRPCXX_SUPPORT_BYTE_BUFFER_H
84 dest->set_buffer(byte_buffer);
97 #endif // GRPCXX_SUPPORT_BYTE_BUFFER_H
void Clear()
Remove all data.
A wrapper around grpc_slice.
Definition: slice.h:32
Definition: grpc_types.h:41
void Swap(ByteBuffer *other)
Swap the state of *this and *other.
Defines how to serialize and deserialize some type.
Definition: serialization_traits.h:49
size_t Length() const
Buffer size in bytes.
Status Dump(std::vector< Slice > *slices) const
Dump (read) the buffer contents into slices.
GRPCAPI grpc_byte_buffer * grpc_byte_buffer_copy(grpc_byte_buffer *bb)
Copies input byte buffer bb.
ByteBuffer & operator=(const ByteBuffer &)
static Status Deserialize(grpc_byte_buffer *byte_buffer, ByteBuffer *dest)
Definition: byte_buffer.h:83
Did it work? If it didn't, why?
Definition: status.h:30
static Status Serialize(const ByteBuffer &source, grpc_byte_buffer **buffer, bool *own_buffer)
Definition: byte_buffer.h:87
static const Status & OK
An OK pre-defined instance.
Definition: status.h:51
ByteBuffer()
Constuct an empty buffer.
Definition: byte_buffer.h:38
A sequence of bytes.
Definition: byte_buffer.h:35