34 #ifndef GRPCXX_IMPL_CODEGEN_CLIENT_UNARY_CALL_H
35 #define GRPCXX_IMPL_CODEGEN_CLIENT_UNARY_CALL_H
46 class CompletionQueue;
50 template <
class InputMessage,
class OutputMessage>
53 OutputMessage* result) {
55 Call call(channel->CreateCall(method, context, &cq));
59 Status status = ops.SendMessage(request);
63 ops.SendInitialMetadata(context->send_initial_metadata_);
64 ops.RecvInitialMetadata(context);
65 ops.RecvMessage(result);
66 ops.ClientSendClose();
67 ops.ClientRecvStatus(context, &status);
68 call.PerformOps(&ops);
69 GPR_ASSERT((cq.Pluck(&ops) && ops.got_message) || !status.
ok());
75 #endif // GRPCXX_IMPL_CODEGEN_CLIENT_UNARY_CALL_H
Definition: client_context.h:152
Codegen interface for grpc::Channel.
Definition: channel_interface.h:64
Status BlockingUnaryCall(ChannelInterface *channel, const RpcMethod &method, ClientContext *context, const InputMessage &request, OutputMessage *result)
Definition: client_unary_call.h:51
Primary implementaiton of CallOpSetInterface.
Definition: call.h:524
A thin wrapper around grpc_completion_queue (see / src/core/surface/completion_queue.h).
Definition: completion_queue.h:81
Definition: rpc_method.h:43
bool ok() const
Is the status OK?
Definition: status.h:67
Did it work? If it didn't, why?
Definition: status.h:45