34 #ifndef GRPCXX_SUPPORT_BYTE_BUFFER_H 
   35 #define GRPCXX_SUPPORT_BYTE_BUFFER_H 
   37 #include <grpc/grpc.h> 
   38 #include <grpc/byte_buffer.h> 
   39 #include <grpc/support/log.h> 
   61   void Dump(std::vector<Slice>* slices) 
const;
 
   76   void set_buffer(grpc_byte_buffer* buf) {
 
   78       gpr_log(GPR_ERROR, 
"Overriding existing buffer");
 
   85   grpc_byte_buffer* buffer()
 const { 
return buffer_; }
 
   87   grpc_byte_buffer* buffer_;
 
   94                             int max_message_size) {
 
   95     dest->set_buffer(byte_buffer);
 
  100     *buffer = source.buffer();
 
  108 #endif  // GRPCXX_SUPPORT_BYTE_BUFFER_H 
void Clear()
Remove all data. 
 
A wrapper around grpc_slice. 
Definition: slice.h:47
 
#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:93
 
Defines how to serialize and deserialize some type. 
Definition: serialization_traits.h:64
 
size_t Length() const 
Buffer size in bytes. 
 
void Dump(std::vector< Slice > *slices) const 
Dump (read) the buffer contents into slices. 
 
Did it work? If it didn't, why? 
Definition: status.h:45
 
static Status Serialize(const ByteBuffer &source, grpc_byte_buffer **buffer, bool *own_buffer)
Definition: byte_buffer.h:98
 
static const Status & OK
An OK pre-defined instance. 
Definition: status.h:57
 
ByteBuffer()
Constuct an empty buffer. 
Definition: byte_buffer.h:53
 
A sequence of bytes. 
Definition: byte_buffer.h:50