diff options
author | Vijay Pai <vpai@google.com> | 2017-08-21 22:34:37 -0700 |
---|---|---|
committer | Vijay Pai <vpai@google.com> | 2017-09-14 17:55:13 -0700 |
commit | 4b047a3bff92ff377205be38d9044b9d99e06fbb (patch) | |
tree | 73af614582d8b6daf2e277a8f32b5bd122100d81 /include/grpc++/generic | |
parent | c3aba91be94d336a27f945a644233bc244f22e2b (diff) |
Construction of streams shouldn't require triggering async ops
Diffstat (limited to 'include/grpc++/generic')
-rw-r--r-- | include/grpc++/generic/generic_stub.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/grpc++/generic/generic_stub.h b/include/grpc++/generic/generic_stub.h index 7b269d0887..2b3ff59ea2 100644 --- a/include/grpc++/generic/generic_stub.h +++ b/include/grpc++/generic/generic_stub.h @@ -44,6 +44,13 @@ class GenericStub final { ClientContext* context, const grpc::string& method, CompletionQueue* cq, void* tag); + /// Setup a call to a named method \a method using \a 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). + std::unique_ptr<GenericClientAsyncReaderWriter> PrepareCall( + ClientContext* context, const grpc::string& method, CompletionQueue* cq); + private: std::shared_ptr<ChannelInterface> channel_; }; |