34 #ifndef GRPCXX_BYTE_BUFFER_H
35 #define GRPCXX_BYTE_BUFFER_H
37 #include <grpc/grpc.h>
38 #include <grpc/byte_buffer.h>
39 #include <grpc/support/log.h>
57 grpc_byte_buffer_destroy(buffer_);
61 void Dump(std::vector<Slice>* slices)
const;
73 void set_buffer(grpc_byte_buffer* buf) {
75 gpr_log(GPR_ERROR,
"Overriding existing buffer");
81 grpc_byte_buffer* buffer()
const {
return buffer_; }
83 grpc_byte_buffer* buffer_;
90 int max_message_size) {
91 dest->set_buffer(byte_buffer);
96 *buffer = source.buffer();
104 #endif // GRPCXX_BYTE_BUFFER_H
#define GRPC_FINAL
Definition: config.h:71
static Status Deserialize(grpc_byte_buffer *byte_buffer, ByteBuffer *dest, int max_message_size)
Definition: byte_buffer.h:89
Defines how to serialize and deserialize some type.
Definition: serialization_traits.h:64
void Dump(std::vector< Slice > *slices) const
~ByteBuffer()
Definition: byte_buffer.h:55
static Status Serialize(const ByteBuffer &source, grpc_byte_buffer **buffer, bool *own_buffer)
Definition: byte_buffer.h:94
static const Status & OK
Definition: status.h:49
ByteBuffer()
Definition: byte_buffer.h:51
Definition: byte_buffer.h:49