GRPC C++  1.13.0-dev
Public Member Functions
grpc::GenericStub Class Referencefinal

Generic stubs provide a type-unsafe interface to call gRPC methods by name. More...

#include <generic_stub.h>

Public Member Functions

 GenericStub (std::shared_ptr< ChannelInterface > channel)
 
std::unique_ptr< GenericClientAsyncReaderWriterPrepareCall (ClientContext *context, const grpc::string &method, CompletionQueue *cq)
 Setup a call to a named method method using context, but don't start it. More...
 
std::unique_ptr< GenericClientAsyncResponseReaderPrepareUnaryCall (ClientContext *context, const grpc::string &method, const ByteBuffer &request, CompletionQueue *cq)
 Setup a unary call to a named method method using context, and don't start it. More...
 
std::unique_ptr< GenericClientAsyncReaderWriterCall (ClientContext *context, const grpc::string &method, CompletionQueue *cq, void *tag)
 DEPRECATED for multi-threaded use Begin a call to a named method method using context. More...
 

Detailed Description

Generic stubs provide a type-unsafe interface to call gRPC methods by name.

Constructor & Destructor Documentation

◆ GenericStub()

grpc::GenericStub::GenericStub ( std::shared_ptr< ChannelInterface channel)
inlineexplicit

Member Function Documentation

◆ Call()

std::unique_ptr<GenericClientAsyncReaderWriter> grpc::GenericStub::Call ( ClientContext context,
const grpc::string method,
CompletionQueue cq,
void *  tag 
)

DEPRECATED for multi-threaded use Begin a call to a named method method using context.

A tag tag will be delivered to cq when the call has been started (i.e, initial metadata has been sent). The return value only indicates whether or not registration of the call succeeded (i.e. the call won't proceed if the return value is nullptr).

◆ PrepareCall()

std::unique_ptr<GenericClientAsyncReaderWriter> grpc::GenericStub::PrepareCall ( ClientContext context,
const grpc::string method,
CompletionQueue cq 
)

Setup a call to a named method method using context, but don't start it.

Let it be started explicitly with StartCall and a tag. The return value only indicates whether or not registration of the call succeeded (i.e. the call won't proceed if the return value is nullptr).

◆ PrepareUnaryCall()

std::unique_ptr<GenericClientAsyncResponseReader> grpc::GenericStub::PrepareUnaryCall ( ClientContext context,
const grpc::string method,
const ByteBuffer request,
CompletionQueue cq 
)

Setup a unary call to a named method method using context, and don't start it.

Let it be started explicitly with StartCall. The return value only indicates whether or not registration of the call succeeded (i.e. the call won't proceed if the return value is nullptr).


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