I am trying to build a `grpc` `rpc` which has stream on server side.
The proto is like
rpc xyz (abc) return (stream asd){}
How to build a C++ client to keep listening on the stream even after the
`rpc` returns response once.
std::unique_ptr<ClientReader<asd>> reader(stub_->xyz(&context,
request));
while (reader->Read(&reply)) {
std::cout<<"Response got from server: " << reply.message() << " "
<< std::endl;
}
I am able to get reply once but how to keep listening on the same channel
even after the response come. I tried introducing `while()` but it closes
after raising exception.
The grpc server is written in java.
--
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/db5d777b-bb8c-439d-b7cd-dc8a140a3c5b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.