Static Public Member Functions | List of all members
grpc::internal::ClientAsyncResponseReaderHelper Class Reference

#include <async_unary_call.h>

Static Public Member Functions

template<class R , class W , class BaseR = R, class BaseW = W>
static ClientAsyncResponseReader< R > * Create (grpc::ChannelInterface *channel, grpc::CompletionQueue *cq, const grpc::internal::RpcMethod &method, grpc::ClientContext *context, const W &request)
 
template<class R , class W >
static void SetupRequest (grpc_call *call, grpc::internal::CallOpSendInitialMetadata **single_buf_ptr, std::function< void(ClientContext *, internal::Call *, internal::CallOpSendInitialMetadata *, void *)> *read_initial_metadata, std::function< void(ClientContext *, internal::Call *, bool initial_metadata_read, internal::CallOpSendInitialMetadata *, internal::CallOpSetInterface **, void *, Status *, void *)> *finish, const W &request)
 
static void StartCall (grpc::ClientContext *context, grpc::internal::CallOpSendInitialMetadata *single_buf)
 

Detailed Description

Definition at line 78 of file grpcpp/impl/codegen/async_unary_call.h.

Member Function Documentation

◆ Create()

template<class R , class W , class BaseR = R, class BaseW = W>
static ClientAsyncResponseReader<R>* grpc::internal::ClientAsyncResponseReaderHelper::Create ( grpc::ChannelInterface channel,
grpc::CompletionQueue cq,
const grpc::internal::RpcMethod method,
grpc::ClientContext context,
const W request 
)
inlinestatic

Start a call and write the request out if start is set. tag will be notified on cq when the call has been started (i.e. intitial metadata sent) and request has been written out. If start is not set, the actual call must be initiated by StartCall Note that context will be used to fill in custom initial metadata used to send to the server when starting the call.

Optionally pass in a base class for request and response types so that the internal functions and structs can be templated based on that, allowing reuse across RPCs (e.g., MessageLite for protobuf). Since constructors can't have an explicit template parameter, the last argument is an extraneous parameter just to provide the needed type information.

Definition at line 93 of file grpcpp/impl/codegen/async_unary_call.h.

◆ SetupRequest()

template<class R , class W >
static void grpc::internal::ClientAsyncResponseReaderHelper::SetupRequest ( grpc_call call,
grpc::internal::CallOpSendInitialMetadata **  single_buf_ptr,
std::function< void(ClientContext *, internal::Call *, internal::CallOpSendInitialMetadata *, void *)> *  read_initial_metadata,
std::function< void(ClientContext *, internal::Call *, bool initial_metadata_read, internal::CallOpSendInitialMetadata *, internal::CallOpSetInterface **, void *, Status *, void *)> *  finish,
const W request 
)
inlinestatic

Definition at line 112 of file grpcpp/impl/codegen/async_unary_call.h.

◆ StartCall()

static void grpc::internal::ClientAsyncResponseReaderHelper::StartCall ( grpc::ClientContext context,
grpc::internal::CallOpSendInitialMetadata single_buf 
)
inlinestatic

Definition at line 189 of file grpcpp/impl/codegen/async_unary_call.h.


The documentation for this class was generated from the following file:


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:33