Hi Vijay,
Thanks for your answer!
One follow-up question: Is it safe to create a stub through its constructor
Service::Stub(channel) rather than the function Service::NewStub(channel)?
I'm asking this because I'm writing a function like this
template <typename T, typename Request, typename Response>
Response send(
const shared_ptr<Channel>& channel,
unique_ptr<ClientAsyncResponseReader<Response>(T::*method)(
ClienContext*, const Request&, CompletionQueue*),
const Request& request);
And I'd like to have all type arguments inferred automatically.
However, here I can only get T as a Stub class,
and it is impossible to infer the Service class,
so I cannot use Service::NewStub().
Thank you in advance,
Chun-Hung
On Wed, Jun 7, 2017 at 11:38 AM, Vijay Pai <[email protected]> wrote:
> The method name choice is essentially stable since all supported languages
> interop with the same method names. That said, the existence of classes
> like RpcMethod is an internal detail and could change (just like all other
> details in the codegen output that are language-specific).
>
> On Wednesday, June 7, 2017 at 11:02:17 AM UTC-7, [email protected]
> wrote:
>>
>> Hey guys,
>>
>> Please don't mind if you've seen the same question on the Gitter channel
>> before.
>>
>> I'm writing a function template handling multiple async gRPC calls in C++,
>> and I saw that in the generated .grpc.pb.cc file there is an array of
>> method names like
>> "/package.Service/Method" (I assume it represents the endpoint of the RPC
>> handler?)
>> that are used to create RpcMethod objects in the stub implementation.
>> I was wondering if this is considered as internal details that might
>> change over different versions,
>> or if I can generate the same strings and create RpcMethod objects in my
>> function to avoid using
>> &Service::Stub::AsyncMethod safely.
>>
>> Thanks,
>> Chun-Hung
>>
>
--
You received this message because you are subscribed to the Google Groups
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit
https://groups.google.com/d/msgid/grpc-io/CAE9cD2x09dn6Q2Yt7ujnaybWi_0LWWrLyRAk122F1aGw65PW4A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.