On Tue, Nov 15, 2016 at 4:37 PM, <[email protected]> wrote:
> Thanks for the reply. I am not using gRPC. I want to use protobuf to
> define RPC, but have a separate or customized transport implementation.
>
There is no such thing as sync vs. async API in proto definition. It's only
relevant in the generated service API. For example, given:
service HelloService {
rpc Hello(Request) returns (Response);
}
You can generate code that provides sync API, or generate code that
provides async API:
class HelloService {
public:
void Hello(const Request& request, const std::function<void(const
Response&)>& result_callback);
}
>
> On Tuesday, November 15, 2016 at 4:30:12 PM UTC-8, Feng Xiao wrote:
>>
>> Are you using grpc? You can post grpc related questions to
>> https://groups.google.com/forum/#!forum/grpc-io
>>
>> On Tue, Nov 15, 2016 at 4:03 PM, <[email protected]> wrote:
>>
>>> I notice that when RPC methods are defined in a proto file, they are all
>>> sync APIs. Is there a way to define async methods? Thanks.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Protocol Buffers" 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/protobuf.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Protocol Buffers" 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/protobuf.
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" 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/protobuf.
For more options, visit https://groups.google.com/d/optout.