19 #ifndef GRPCPP_IMPL_CODEGEN_CLIENT_CALLBACK_H 20 #define GRPCPP_IMPL_CODEGEN_CLIENT_CALLBACK_H 35 class CompletionQueue;
42 template <
class InputMessage,
class OutputMessage>
45 OutputMessage* result,
46 std::function<
void(
Status)> on_completion) {
48 channel, method, context, request, result, on_completion);
51 template <
class InputMessage,
class OutputMessage>
56 OutputMessage* result,
57 std::function<
void(
Status)> on_completion) {
60 Call call(channel->CreateCall(method, context, cq));
68 call.call(),
sizeof(FullCallOpSet))) FullCallOpSet;
75 Status s = ops->SendMessage(*request);
80 ops->SendInitialMetadata(context->send_initial_metadata_,
81 context->initial_metadata_flags());
82 ops->RecvInitialMetadata(context);
83 ops->RecvMessage(result);
84 ops->AllowNoMessage();
85 ops->ClientSendClose();
86 ops->ClientRecvStatus(context, tag->status_ptr());
87 ops->set_cq_tag(tag->tag());
95 #endif // GRPCPP_IMPL_CODEGEN_CLIENT_CALLBACK_H
#define GPR_CODEGEN_ASSERT(x)
Codegen specific version of GPR_ASSERT.
Definition: core_codegen_interface.h:138
Primary implementation of CallOpSetInterface.
Definition: call.h:618
CallbackUnaryCallImpl(ChannelInterface *channel, const RpcMethod &method, ClientContext *context, const InputMessage *request, OutputMessage *result, std::function< void(Status)> on_completion)
Definition: client_callback.h:54
Definition: channel_interface.h:45
A ClientContext allows the person implementing a service client to:
Definition: client_context.h:164
Descriptor of an RPC method.
Definition: rpc_method.h:29
An Alarm posts the user provided tag to its associated completion queue upon expiry or cancellation...
Definition: alarm.h:31
Codegen interface for grpc::Channel.
Definition: channel_interface.h:57
CoreCodegenInterface * g_core_codegen_interface
Definition: call.h:46
Definition: byte_buffer.h:41
A thin wrapper around grpc_completion_queue (see src/core/lib/surface/completion_queue.h).
Definition: completion_queue.h:95
virtual void * grpc_call_arena_alloc(grpc_call *call, size_t length)=0
bool ok() const
Is the status OK?
Definition: status.h:118
Did it work? If it didn't, why?
Definition: status.h:31
Definition: callback_common.h:38
Straightforward wrapping of the C call object.
Definition: call.h:668
void CallbackUnaryCall(ChannelInterface *channel, const RpcMethod &method, ClientContext *context, const InputMessage *request, OutputMessage *result, std::function< void(Status)> on_completion)
Perform a callback-based unary call TODO(vjpai): Combine as much as possible with the blocking unary ...
Definition: client_callback.h:43