An interface for a client-side RPC writer. More...
#include <RpcClientWriter.hpp>
Public Member Functions | |
| virtual | ~RpcClientWriter () noexcept=default |
| Destructor. | |
| virtual void | write (const T &value)=0 |
| Copy write operation. | |
| virtual void | write (T &&value)=0 |
| Move write operation. | |
| virtual void | finish (RpcStatusCode reason=RPC_STATUS_CODE_OK)=0 |
| Marks the end of the input feed. | |
An interface for a client-side RPC writer.
Would be used to write inputs from a client on an operation with @feed annotated inputs.
|
virtualdefaultnoexcept |
Destructor.
|
pure virtual |
Marks the end of the input feed.
Will indicate to the server that no more inputs will be sent. Specifying a reason different from RPC_STATUS_CODE_OK will indicate that the feed was finished due to an error, and that the client will not be expecting a reply.
May block depending on the configured queue sizes in both the client and the server.
| reason | The status code to indicate the reason for finishing the feed. |
| RpcBrokenPipeException | if the communication with the server breaks. |
| RpcTimeoutException | if the operation needs to block for a time longer than the configured timeout. |
|
pure virtual |
Copy write operation.
Will add a value to the input feed, that would be eventually sent to the server. May block depending on the configured queue sizes in both the client and the server.
| value | The value to write to the input feed. |
| RpcBrokenPipeException | if the communication with the server breaks. |
| RpcTimeoutException | if the operation needs to block for a time longer than the configured timeout. |
| RpcOperationError | if the server communicates an error. |
|
pure virtual |
Move write operation.
Will add a value to the input feed, that would be eventually sent to the server. May block depending on the configured queue sizes in both the client and the server.
| value | The value to write to the input feed. |
| RpcBrokenPipeException | if the communication with the server breaks. |
| RpcTimeoutException | if the operation needs to block for a time longer than the configured timeout. |
| RpcOperationError | if the server communicates an error. |