I have defined a bi-directional service that streams large buffers 40 megabytes +. After receiving the entire buffer the server operates on the buffer and is required to return the result of the operation to the client. The client sends 1 megabyte chunks to the server when the entire buffer is successfully reconstructed.
The problem my code is having is that the client finishes streaming the data to the server while the server operates on the data so the client's reader_writer->Read(...) call fails waiting for the server to write its return data to the client's stream.
Is there a way to have the client's Read wait until the server is ready to stream its return data to the client?