So for a service that would have more than one method, I would create a new
CallData() for each method
is that correct?



On Fri, Sep 23, 2016 at 5:22 PM, 'Sree Kuchibhotla' via grpc.io <
[email protected]> wrote:

> Hi Christian,
> I am assuming you are talking about the Greeter async server
> <https://github.com/grpc/grpc/blob/master/examples/cpp/helloworld/greeter_async_server.cc>
> in the examples.  In this case the 'CallData' struct is not a gRPC
> structure. It is an application defined structure passed as a 'tag' to
> *YourServiceName*::AsyncService*YourMethodName(...)* and  S
> erverAsyncResponseWriter<T>::Finish(...) functions.
>
>
> // If the server receives a request for SayHello() function
>
> // the next call to cq_->Next() will return the tag (in this case
>
> // the CallData object passed)
>
> service_->RequestSayHello(&ctx_, &request_, &responder_, cq_, cq_, *this*
> );
>
> // Once the operation Finish() is actually complete, the tag
>
> // (in this case, the CallData object again) is returned via the
>
> // call to cq_->Next()
>
> responder_.Finish(reply_, Status::OK, *this*);
>
> We do not have plans to generate these CallData structures.
>
> Hope this helps
> Sree
>
> On Fri, Sep 23, 2016 at 6:31 AM, <[email protected]> wrote:
>
>> Hello,
>>
>> From reading the C++ example for async server, it seems that one has to
>> write a CallData class for every
>> service and every method?
>>
>> Are there any plans for the compiler to generate those CallData
>> boilerplates?
>>
>> --
>> 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/ms
>> gid/grpc-io/23678b27-c97f-4fc7-8239-aa9b67f1bc21%40googlegroups.com
>> <https://groups.google.com/d/msgid/grpc-io/23678b27-c97f-4fc7-8239-aa9b67f1bc21%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> 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/CALRi9Qe4duy671_sVSU%2BJCTznx2-W1YCqCGkYrx_%
> 3DnX8zk1zzw%40mail.gmail.com
> <https://groups.google.com/d/msgid/grpc-io/CALRi9Qe4duy671_sVSU%2BJCTznx2-W1YCqCGkYrx_%3DnX8zk1zzw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Christian Rivasseau
Co-founder and CTO @ Lefty <http://www.lefty.io>
+33 6 67 35 26 74

-- 
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/CAJ6g4%3Db7APNyy1%3DiGUvU1Q77X6o5UadoiHX0_to8PjuctL53Qw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to