19 #ifndef GRPCPP_IMPL_CODEGEN_BYTE_BUFFER_H 20 #define GRPCPP_IMPL_CODEGEN_BYTE_BUFFER_H 34 class ServerInterface;
37 class CallOpSendMessage;
42 template <
class ServiceType,
class RequestType,
class ResponseType>
44 template <
class ServiceType,
class RequestType,
class ResponseType>
71 Status Dump(std::vector<Slice>* slices)
const;
93 size_t Length()
const;
99 bool Valid()
const {
return (buffer_ !=
nullptr); }
109 template <
class ServiceType,
class RequestType,
class ResponseType>
111 template <
class ServiceType,
class RequestType,
class ResponseType>
129 class ByteBufferPointer {
140 ByteBufferPointer bbuf_ptr()
const {
return ByteBufferPointer(
this); }
147 dest->set_buffer(byte_buffer->buffer_);
160 #endif // GRPCPP_IMPL_CODEGEN_BYTE_BUFFER_H
void Clear()
Remove all data.
Definition: byte_buffer.h:74
A wrapper class of an application provided server streaming handler.
Definition: byte_buffer.h:45
static Status Serialize(const ByteBuffer &source, ByteBuffer *buffer, bool *own_buffer)
Definition: byte_buffer.h:150
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:84
Definition: grpc_types.h:40
bool Valid() const
Is this ByteBuffer valid?
Definition: byte_buffer.h:99
Definition: byte_buffer.h:47
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:90
static Status Deserialize(ByteBuffer *byte_buffer, ByteBuffer *dest)
Definition: byte_buffer.h:146
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:43
CoreCodegenInterface * g_core_codegen_interface
Definition: call.h:46
Definition: byte_buffer.h:39
Definition: server_interface.h:48
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:31
~ByteBuffer()
Definition: byte_buffer.h:62
static const Status & OK
An OK pre-defined instance.
Definition: status.h:105
ByteBuffer()
Constuct an empty buffer.
Definition: byte_buffer.h:53
A sequence of bytes.
Definition: byte_buffer.h:50