19 #ifndef GRPCXX_IMPL_CODEGEN_ASYNC_UNARY_CALL_H
20 #define GRPCXX_IMPL_CODEGEN_ASYNC_UNARY_CALL_H
32 class CompletionQueue;
69 virtual void Finish(R* msg,
Status* status,
void* tag) = 0;
85 const ::grpc::internal::RpcMethod& method,
ClientContext* context,
86 const W& request,
bool start) {
102 static void operator delete(
void* ptr, std::size_t size) {
135 if (!context_->initial_metadata_received_) {
152 const W& request,
bool start)
153 : context_(context), call_(call), started_(start) {
158 if (start) StartCallInternal();
161 void StartCallInternal() {
163 context_->initial_metadata_flags());
168 static void*
operator new(std::size_t size);
169 static void*
operator new(std::size_t size,
void* p) {
return p; }
190 : call_(nullptr, nullptr, nullptr), ctx_(ctx) {}
204 ctx_->initial_metadata_flags());
208 ctx_->sent_initial_metadata_ =
true;
229 if (!ctx_->sent_initial_metadata_) {
231 ctx_->initial_metadata_flags());
235 ctx_->sent_initial_metadata_ =
true;
262 if (!ctx_->sent_initial_metadata_) {
264 ctx_->initial_metadata_flags());
268 ctx_->sent_initial_metadata_ =
true;
291 class default_delete<grpc::ClientAsyncResponseReader<R>> {
296 class default_delete<grpc::ClientAsyncResponseReaderInterface<R>> {
302 #endif // GRPCXX_IMPL_CODEGEN_ASYNC_UNARY_CALL_H
void FinishWithError(const Status &status, void *tag)
Indicate that the stream is to be finished with a non-OK status, and request notification for when th...
Definition: async_unary_call.h:259
virtual ~ClientAsyncResponseReaderInterface()
Definition: async_unary_call.h:40
grpc_compression_level compression_level() const
Return the compression algorithm to be used by the server call.
Definition: server_context.h:171
virtual void Finish(R *msg, Status *status, void *tag)=0
Request to receive the server's response msg and final status for the call, and to notify tag on this...
void ClientSendClose()
Definition: call.h:467
virtual void StartCall()=0
Start the call that was set up by the constructor, but only if the constructor was invoked through th...
Definition: async_unary_call.h:74
void Finish(const W &msg, const Status &status, void *tag)
Indicate that the stream is to be finished and request notification when the server has sent the appr...
Definition: async_unary_call.h:227
#define GPR_CODEGEN_ASSERT(x)
Codegen specific version of GPR_ASSERT.
Definition: core_codegen_interface.h:135
void StartCall() override
Start the call that was set up by the constructor, but only if the constructor was invoked through th...
Definition: async_unary_call.h:106
virtual void ReadInitialMetadata(void *tag)=0
Request notification of the reading of initial metadata.
Definition: service_type.h:39
void ClientRecvStatus(ClientContext *context, Status *status)
Definition: call.h:563
Async API for client-side unary RPCs, where the message response received from the server is of type ...
Definition: async_unary_call.h:98
A ClientContext allows the person implementing a service client to:
Definition: client_context.h:162
void operator()(void *p)
Definition: async_unary_call.h:293
void SendInitialMetadata(void *tag) override
See ServerAsyncStreamingInterface::SendInitialMetadata for semantics.
Definition: async_unary_call.h:199
A CallOpSet that does not post completions to the completion queue.
Definition: call.h:674
Status SendMessage(const M &message, WriteOptions options) GRPC_MUST_USE_RESULT
Send message using options for the write.
Definition: call.h:317
An interface relevant for async client side unary RPCs (which send one request message to a server an...
Definition: async_unary_call.h:38
void operator()(void *p)
Definition: async_unary_call.h:298
static ClientAsyncResponseReader< R > * Create(ChannelInterface *channel, CompletionQueue *cq, const ::grpc::internal::RpcMethod &method, ClientContext *context, const W &request, bool start)
Start a call and write the request out if start is set.
Definition: async_unary_call.h:83
Codegen interface for grpc::Channel.
Definition: channel_interface.h:55
CoreCodegenInterface * g_core_codegen_interface
Definition: call.h:46
void ReadInitialMetadata(void *tag) override
See ClientAsyncResponseReaderInterface::ReadInitialMetadata for semantics.
Definition: async_unary_call.h:118
Definition: byte_buffer.h:37
A ServerContext allows the person implementing a service handler to:
Definition: server_context.h:96
void AllowNoMessage()
Definition: call.h:348
A thin wrapper around grpc_completion_queue (see src/core/lib/surface/completion_queue.h).
Definition: completion_queue.h:94
virtual void * grpc_call_arena_alloc(grpc_call *call, size_t length)=0
grpc_call * call() const
Definition: call.h:703
ServerAsyncResponseWriter(ServerContext *ctx)
Definition: async_unary_call.h:189
void ServerSendStatus(const std::multimap< grpc::string, grpc::string > &trailing_metadata, const Status &status)
Definition: call.h:487
void RecvMessage(R *message)
Definition: call.h:345
void set_output_tag(void *return_tag)
Definition: call.h:660
bool ok() const
Is the status OK?
Definition: status.h:64
Did it work? If it didn't, why?
Definition: status.h:30
Async server-side API for handling unary calls, where the single response message sent to the client ...
Definition: async_unary_call.h:186
void Finish(R *msg, Status *status, void *tag) override
See ClientAysncResponseReaderInterface::Finish for semantics.
Definition: async_unary_call.h:132
void PerformOps(CallOpSetInterface *ops)
Definition: call.h:699
bool compression_level_set() const
Return a bool indicating whether the compression level for this call has been set (either implicitly ...
Definition: server_context.h:186
Straightforward wrapping of the C call object.
Definition: call.h:683