Hi,
I have gRPC server with bidirectional method, that receive some numbers in stream and the server streams some numbers back, totally async.
But if the number is not good (for some reason), the server that written in java invokes the observer.onError().
I have client implemented in Java for that server, and when the server raise error in catchs in the client receiver observer on the onError() and everything is fine.
Now I want to write C++ implementation of this client but something is different. In C++ there is no way to register for error events, I could get the error only after I invoke the stream->Finish(), but it's not good for me because we are talking about long living streams, unbounded. I can't wait for the finish to get the error - I must know when the server raised an error WHILE I send the numbers from client to server.
In other words, what is the equivalent of java SessionObserver.onError() in C++? How can I be notified when the server raise onError()?