GRPC C++  1.62.0
Static Public Member Functions
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)
 Start a call and write the request out if start is set. More...
 
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)
 

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. initial 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.

◆ 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

◆ StartCall()

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

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