Go to the documentation of this file.
19 #ifndef GRPCPP_GENERIC_GENERIC_STUB_H
20 #define GRPCPP_GENERIC_GENERIC_STUB_H
41 template <
class RequestType,
class ResponseType>
53 std::unique_ptr<ClientAsyncReaderWriter<RequestType, ResponseType>>
56 return CallInternal(channel_.get(), context, method, {}, cq,
67 return std::unique_ptr<ClientAsyncResponseReader<ResponseType>>(
68 internal::ClientAsyncResponseReaderHelper::Create<ResponseType>(
85 std::unique_ptr<ClientAsyncReaderWriter<RequestType, ResponseType>>
Call(
88 return CallInternal(channel_.get(), context, method, {}, cq,
94 ResponseType>::channel_;
96 std::unique_ptr<ClientAsyncReaderWriter<RequestType, ResponseType>>
100 return std::unique_ptr<ClientAsyncReaderWriter<RequestType, ResponseType>>(
106 context, start, tag));
114 #endif // GRPCPP_GENERIC_GENERIC_STUB_H
TemplatedGenericStubCallbackInternal(std::shared_ptr< grpc::ChannelInterface > channel)
Definition: generic_stub_internal.h:46
Generic stubs provide a type-unaware interface to call gRPC methods by name.
Definition: generic_stub_internal.h:44
An Alarm posts the user-provided tag to its associated completion queue or invokes the user-provided ...
Definition: alarm.h:33
const char * suffix_for_stats() const
Definition: stub_options.h:34
ClientAsyncResponseReader< ByteBuffer > GenericClientAsyncResponseReader
Definition: generic_stub.h:36
static ClientAsyncReaderWriter< W, R > * Create(grpc::ChannelInterface *channel, grpc::CompletionQueue *cq, const grpc::internal::RpcMethod &method, grpc::ClientContext *context, bool start, void *tag)
Create a stream object.
Definition: async_stream.h:497
Useful interface for generated stubs.
Definition: stub_options.h:25
@ BIDI_STREAMING
Definition: rpc_method.h:35
A ClientContext allows the person implementing a service client to:
Definition: client_context.h:195
Async API for client-side unary RPCs, where the message response received from the server is of type ...
Definition: client_context.h:93
ClientAsyncReaderWriter< ByteBuffer, ByteBuffer > GenericClientAsyncReaderWriter
Definition: generic_stub.h:32
Codegen interface for grpc::Channel.
Definition: channel_interface.h:71
std::unique_ptr< ClientAsyncReaderWriter< RequestType, ResponseType > > PrepareCall(ClientContext *context, const std::string &method, grpc::CompletionQueue *cq)
Setup a call to a named method method using context, but don't start it.
Definition: generic_stub.h:54
@ NORMAL_RPC
Definition: rpc_method.h:32
Generic stubs provide a type-unaware interface to call gRPC methods by name.
Definition: generic_stub.h:42
Async client-side interface for bi-directional streaming, where the outgoing message stream going to ...
Definition: client_context.h:91
TemplatedGenericStub< grpc::ByteBuffer, grpc::ByteBuffer > GenericStub
Definition: generic_stub.h:110
A thin wrapper around grpc_completion_queue (see src/core/lib/surface/completion_queue....
Definition: completion_queue.h:105
Descriptor of an RPC method.
Definition: rpc_method.h:29
std::unique_ptr< ClientAsyncReaderWriter< RequestType, ResponseType > > Call(ClientContext *context, const std::string &method, grpc::CompletionQueue *cq, void *tag)
DEPRECATED for multi-threaded use Begin a call to a named method method using context.
Definition: generic_stub.h:85
std::unique_ptr< ClientAsyncResponseReader< ResponseType > > PrepareUnaryCall(ClientContext *context, const std::string &method, const RequestType &request, grpc::CompletionQueue *cq)
Setup a unary call to a named method method using context, and don't start it.
Definition: generic_stub.h:64