19 #ifndef GRPCXX_IMPL_CODEGEN_BYTE_BUFFER_H
20 #define GRPCXX_IMPL_CODEGEN_BYTE_BUFFER_H
35 class CallOpSendMessage;
40 template <
class ServiceType,
class RequestType,
class ResponseType>
42 template <
class ServiceType,
class RequestType,
class ResponseType>
97 bool Valid()
const {
return (buffer_ !=
nullptr); }
106 template <
class ServiceType,
class RequestType,
class ResponseType>
108 template <
class ServiceType,
class RequestType,
class ResponseType>
126 class ByteBufferPointer {
137 ByteBufferPointer bbuf_ptr()
const {
return ByteBufferPointer(
this); }
144 dest->set_buffer(byte_buffer->buffer_);
157 #endif // GRPCXX_IMPL_CODEGEN_BYTE_BUFFER_H
void Clear()
Remove all data.
Definition: byte_buffer.h:72
A wrapper class of an application provided server streaming handler.
Definition: byte_buffer.h:43
static Status Serialize(const ByteBuffer &source, ByteBuffer *buffer, bool *own_buffer)
Definition: byte_buffer.h:147
A wrapper around grpc_slice.
Definition: slice.h:35
void Duplicate()
Make a duplicate copy of the internals of this byte buffer so that we have our own owned version of i...
Definition: byte_buffer.h:82
Definition: grpc_types.h:41
void Swap(ByteBuffer *other)
Swap the state of *this and *other.
Definition: byte_buffer.h:45
bool Valid() const
Is this ByteBuffer valid?
Definition: byte_buffer.h:97
virtual void grpc_byte_buffer_destroy(grpc_byte_buffer *bb)=0
Defines how to serialize and deserialize some type.
Definition: serialization_traits.h:58
size_t Length() const
Buffer size in bytes.
void Release()
Forget underlying byte buffer without destroying Use this only for un-owned byte buffers.
Definition: byte_buffer.h:88
static Status Deserialize(ByteBuffer *byte_buffer, ByteBuffer *dest)
Definition: byte_buffer.h:143
Status Dump(std::vector< Slice > *slices) const
Dump (read) the buffer contents into slices.
A wrapper class of an application provided rpc method handler.
Definition: byte_buffer.h:41
CoreCodegenInterface * g_core_codegen_interface
Definition: call.h:46
ByteBuffer & operator=(const ByteBuffer &)
Definition: byte_buffer.h:37
virtual grpc_byte_buffer * grpc_byte_buffer_copy(grpc_byte_buffer *bb)=0
Base class for running an RPC handler.
Definition: rpc_service_method.h:38
Did it work? If it didn't, why?
Definition: status.h:30
~ByteBuffer()
Definition: byte_buffer.h:60
static const Status & OK
An OK pre-defined instance.
Definition: status.h:51
ByteBuffer()
Constuct an empty buffer.
Definition: byte_buffer.h:51
A sequence of bytes.
Definition: byte_buffer.h:48