#include <async_unary_call.h>
|
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) |
|
◆ Create()
template<class R , class W , class BaseR = R, class BaseW = W>
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()
The documentation for this class was generated from the following file: