GRPC C++  1.24.0
Data Structures | Public Member Functions
grpc_impl::GenericStub Class Referencefinal

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

#include <generic_stub_impl.h>

Data Structures

class  experimental_type
 NOTE: class experimental_type is not part of the public API of this class TODO(vjpai): Move these contents to the public API of GenericStub when they are no longer experimental. More...
 

Public Member Functions

 GenericStub (std::shared_ptr< grpc::ChannelInterface > channel)
 
std::unique_ptr< grpc::GenericClientAsyncReaderWriterPrepareCall (grpc::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< grpc::GenericClientAsyncResponseReaderPrepareUnaryCall (grpc_impl::ClientContext *context, const grpc::string &method, const grpc::ByteBuffer &request, CompletionQueue *cq)
 Setup a unary call to a named method method using context, and don't start it. More...
 
std::unique_ptr< grpc::GenericClientAsyncReaderWriterCall (grpc_impl::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...
 
experimental_type experimental ()
 NOTE: The function experimental() is not stable public API. More...
 

Detailed Description

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

Constructor & Destructor Documentation

◆ GenericStub()

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

Member Function Documentation

◆ Call()

std::unique_ptr<grpc::GenericClientAsyncReaderWriter> grpc_impl::GenericStub::Call ( grpc_impl::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).

◆ experimental()

experimental_type grpc_impl::GenericStub::experimental ( )
inline

NOTE: The function experimental() is not stable public API.

It is a view to the experimental components of this class. It may be changed or removed at any time.

◆ PrepareCall()

std::unique_ptr<grpc::GenericClientAsyncReaderWriter> grpc_impl::GenericStub::PrepareCall ( grpc::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<grpc::GenericClientAsyncResponseReader> grpc_impl::GenericStub::PrepareUnaryCall ( grpc_impl::ClientContext context,
const grpc::string method,
const grpc::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: