Template Class RpcInterface
Defined in File rpc_interface.hpp
Class Documentation
-
template<typename RpcType, typename SendErrorEnum>
class RpcInterface The RpcInterface class defines the request/response interface used by the Request/Response classes to make them generic. This allows any client or server specialization to be stored as a reference by the Request/Response class. It is also needed to avoid circular dependencies between Request/Response and Client/Sever.
- Template Parameters:
RpcType – is either Request<T> for the client or Response<T> for the server
Public Functions
-
virtual cxx::expected<SendErrorEnum> send(RpcType &&rpcData) noexcept = 0
Sends the given Request<T> or Response<T> via the type which implements this interface.
- Parameters:
rpcData – [in] is the actual Request<T> or Response<T> instance
- Returns:
Error if sending was not successful
Protected Functions
-
RpcInterface() = default