19 #ifndef GRPCPP_IMPL_CODEGEN_BYTE_BUFFER_H 20 #define GRPCPP_IMPL_CODEGEN_BYTE_BUFFER_H 35 class CallOpSendMessage;
40 template <
class ServiceType,
class RequestType,
class ResponseType>
42 template <
class ServiceType,
class RequestType,
class ResponseType>
69 Status Dump(std::vector<Slice>* slices)
const;
91 size_t Length()
const;
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 // GRPCPP_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:40
bool Valid() const
Is this ByteBuffer valid?
Definition: byte_buffer.h:97
Definition: byte_buffer.h:45
virtual void grpc_byte_buffer_destroy(grpc_byte_buffer *bb)=0
Defines how to serialize and deserialize some type.
Definition: serialization_traits.h:58
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
An Alarm posts the user provided tag to its associated completion queue upon expiry or cancellation...
Definition: alarm.h:31
A wrapper class of an application provided rpc method handler.
Definition: byte_buffer.h:41
CoreCodegenInterface * g_core_codegen_interface
Definition: call.h:46
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