Hello Derek,

thanks for your help. 

Yes, the procedure to compile is right. If I keep only 1 async rpc stream 
(i.e., say rpc Session), and I recompile, I get the typedef that I am 
expecting:
typedef WithAsyncMethod_Session<Service > AsyncService;

Even if there is multiple async rpc stream there is only 1 typedef produced 
where I would expect many. This lead me to believe that the service must be 
arrange to handle a single async rpc stream or that our proto files are are 
defined properly. Here is the main that includes the other:
syntax = "proto3";

package upfservice.v1;

import "session.proto";
import "hello.proto";

// The Upfu_BfRuntime service definition.
service UPFService {
// Initial handshake initiated by client. 
rpc Hello(stream HelloRequest) returns (stream HelloResponse) {}

// Client shutdown (resource can be cleaned up)
rpc Bye(ByeRequest) returns (ByeResponse) {}

// Ping request
rpc Ping(PingRequest) returns (PingResponse) {}

// Session management bi-directional streaming api.
rpc Session(stream ServiceDataSessionRequest) returns (stream 
ServiceDataSessionResponse) {}

// UR collection server streaming (client call this one then wait for 
continuous UR stream)
rpc UsageReport(UsageReportRequest) returns (stream UsageReports) {}
}



What typedef sould I expect out of there?


On Wednesday, 6 May 2020 21:02:31 UTC-4, Derek Perez wrote:
>
> Here's a link to the docs for the protoc grpc plugin: 
> https://grpc.io/docs/tutorials/basic/cpp/#generating-client-and-server-code
>   
>
> On Wed, May 6, 2020 at 6:00 PM Derek Perez <[email protected]> wrote:
>
>> Are you generating the C++ code with the proper grpc plugin as well? 
>> Services won't generate useful stubs without that.
>>
>> On Wed, May 6, 2020 at 4:52 PM Paul Lemay <[email protected] 
>> <javascript:>> wrote:
>>
>>> Hello,
>>>
>>> I have this proto files where the root file is defined as below:
>>>
>>> syntax = "proto3";
>>>
>>> package upfservice.v1;
>>>
>>> import "session.proto";
>>> import "hello.proto";
>>>
>>> // The Upfu_BfRuntime service definition.
>>> service UPFService {
>>> // Initial handshake initiated by client. 
>>> rpc Hello(stream HelloRequest) returns (stream HelloResponse) {}
>>>
>>> // Client shutdown (resource can be cleaned up)
>>> rpc Bye(ByeRequest) returns (ByeResponse) {}
>>>
>>> // Ping request
>>> rpc Ping(PingRequest) returns (PingResponse) {}
>>>
>>> // Session management bi-directional streaming api.
>>> rpc Session(stream ServiceDataSessionRequest) returns (stream 
>>> ServiceDataSessionResponse) {}
>>>
>>> // UR collection server streaming (client call this one then wait for 
>>> continuous UR stream)
>>> rpc UsageReport(UsageReportRequest) returns (stream UsageReports) {}
>>> }
>>>
>>> The generated file gives me a typedef to work with:
>>>
>>>
>>> typedef 
>>> WithAsyncMethod_Hello<WithAsyncMethod_Bye<WithAsyncMethod_Ping<WithAsyncMethod_Session<WithAsyncMethod_UsageReport<Service
>>>  
>>> > > > > > AsyncService;
>>>
>>> It does not seems right since I can't use the AsyncService to do 
>>> anything. Is it because there is a limit of 1 asynchronous stream rpc per 
>>> service?
>>>
>>>
>>>
>>> -- 
>>> 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] <javascript:>.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/protobuf/a3941835-afcf-4a60-92fb-844a59837708%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/protobuf/a3941835-afcf-4a60-92fb-844a59837708%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/ae539931-569e-43fb-a32c-ea97e6aeb6cd%40googlegroups.com.

Reply via email to