On 25 Kwi, 12:37, John Doe <
johndoeilikeche...@gmail.com> wrote:
> I have two problems with that code.
>
> 1) If the size of the file being send is not multiple of 4, then client
> throws yami_runtime_error: The value that was given or received is
> incorrect.
Yes. This is correct.
> 2) If the size is multiple of 4, server is receiving the file, but client
> never exits.
> Looks like it's not leaving "wait_for_completion()" - are there any steps
> that server should perform to fix this?
Yes. The message becomes "completed" when there is some feedback from
the server - this can be either a reply message or a rejection
message. The client can then inspect this feedback and continue
processing accordingly. Please check the calculator example to see how
such interaction can look like.
The client can also send the message as a one-way message to express
that it is not interested in any feedback. Or, the client can send the
regular message but instead of waiting for completion do something
else. Please check the print example.
Regards,