Retrieve Server Reply before client streams terminates.

27 views
Skip to first unread message

men...@gmail.com

unread,
Nov 19, 2018, 7:08:54 AM11/19/18
to grpc.io
I can read from documentation:

"A client-streaming RPC is also similar to our simple example, except the client sends a stream of requests to the server instead of a single request. The server sends back a single response, typically but not necessarily after it has received all the client’s requests, along with its status details and optional trailing metadata."

Usually the client does:

    - create channel
    - creaet stub
    - perform the writer = stub->foo(context, reply);
    - loop on:
         writer->Write(request)
    - writer->Done()
    - writer->Finish()
    - At this point I can read the reply


now my question is how can I read the reply before the loop is over? Some time the server indeed stops performing the read loop notifying that there is no need for more requests.
Reply all
Reply to author
Forward
0 new messages