Hello Everyone,

I have implemented a proto file by checking the internet with one unary rpc 
service and stream service. I done the coding part for the unary rpc 
service with c++ for both client and the server. But the second service 
(stream) i cannot able to build the logic on how to send a message from 
server to client while the client will be listening to the server. The 
proto file i am pasting down here. Clarify me if this implementation is 
wrong or how to implement the server to send a message to client in c++?

```
syntax = "proto3";


package Chat;

import "google/protobuf/empty.proto";

service HelloService {
        rpc Hello (HelloRequest) returns (HelloResponse) {}
}

service Messenger {
        rpc ServerTx (Payload) returns (google.protobuf.Empty) {} /* 
serverSide */
        rpc ClientRx (google.protobuf.Empty) returns (stream Payload) {} // 
ClientSide
}


message Payload {

        int32 size = 1;
        string data = 2;

}

message HelloRequest {
        string hello = 1;
}

message HelloResponse {
        string reply = 1;
}
```
Any help would be appreciated. Thanks in advance

-- 
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 grpc-io+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/38558994-8d5b-4e45-972c-9e53f1334aa3n%40googlegroups.com.

Reply via email to