Template Class RpcServerWriter
Defined in File RpcServerWriter.hpp
Class Documentation
-
template<typename T>
class RpcServerWriter An interface for a server-side RPC writer.
Would be used to write replies from a server on an operation with a
@feed
annotated return type.Public Functions
-
virtual ~RpcServerWriter() noexcept = default
Destructor.
-
virtual void write(const T &value) = 0
Copy write operation.
Will add a value to the replies feed, that would be eventually sent to the client. May block depending on the configured queue sizes in both the client and the server.
- Parameters:
value – The value to write to the replies feed.
- Throws:
RpcBrokenPipeException – if the communication with the client breaks.
RpcTimeoutException – if the operation needs to block for a time longer than the configured timeout.
RpcFeedCancelledException – if the client cancels the output feed.
-
virtual void write(T &&value) = 0
Move write operation.
Will add a value to the replies feed, that would be eventually sent to the client. May block depending on the configured queue sizes in both the client and the server.
- Parameters:
value – The value to write to the replies feed.
- Throws:
RpcBrokenPipeException – if the communication with the client breaks.
RpcTimeoutException – if the operation needs to block for a time longer than the configured timeout.
RpcFeedCancelledException – if the client cancels the output feed.
-
virtual ~RpcServerWriter() noexcept = default