20.1.7.14. RpcClientWriter

template<typename T>
class RpcClientWriter

An interface for a client-side RPC writer.

Would be used to write inputs from a client on an operation with @feed annotated inputs.

Public Functions

virtual ~RpcClientWriter() noexcept = default

Destructor.

virtual void write(const T &value) = 0

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.

Parameters:

value – The value to write to the input feed.

Throws:
virtual void write(T &&value) = 0

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.

Parameters:

value – The value to write to the input feed.

Throws:
virtual void finish(RpcStatusCode reason = RPC_STATUS_CODE_OK) = 0

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.

Parameters:

reason – The status code to indicate the reason for finishing the feed.

Throws: