Class of data of RPC.
More...
#include <msgpack_rpc/clients/impl/call.h>
|
| Call (const std::shared_ptr< executors::IExecutor > &executor, std::chrono::steady_clock::time_point deadline) |
| Constructor.
|
std::shared_ptr< CallFutureImpl > | future () const noexcept |
| Get the future object to set and get the result of this RPC.
|
void | set (const messages::CallResult &result) |
| Set the result.
|
void | set (const Status &error) |
| Set an error.
|
template<typename OnTimeout> |
void | set_timeout (std::chrono::steady_clock::time_point deadline, OnTimeout &&on_timeout) |
| Set timeout.
|
Class of data of RPC.
Definition at line 39 of file call.h.
◆ Call()
msgpack_rpc::clients::impl::Call::Call |
( |
const std::shared_ptr< executors::IExecutor > & | executor, |
|
|
std::chrono::steady_clock::time_point | deadline ) |
|
inline |
Constructor.
- Parameters
-
[in] | executor | Executor. |
[in] | deadline | Deadline of the result of the RPC. |
Definition at line 47 of file call.h.
◆ future()
std::shared_ptr< CallFutureImpl > msgpack_rpc::clients::impl::Call::future |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Get the future object to set and get the result of this RPC.
- Returns
- Future object to set and get the result of this RPC.
Definition at line 71 of file call.h.
◆ set() [1/2]
Set the result.
- Parameters
-
Definition at line 80 of file call.h.
◆ set() [2/2]
void msgpack_rpc::clients::impl::Call::set |
( |
const Status & | error | ) |
|
|
inline |
Set an error.
- Parameters
-
Definition at line 87 of file call.h.
◆ set_timeout()
template<typename OnTimeout>
void msgpack_rpc::clients::impl::Call::set_timeout |
( |
std::chrono::steady_clock::time_point | deadline, |
|
|
OnTimeout && | on_timeout ) |
|
inline |
Set timeout.
- Template Parameters
-
OnTimeout | Type of the function to handle timeout. |
- Parameters
-
[in] | deadline | Deadline. |
[in] | on_timeout | Function to handle timeout. |
Definition at line 60 of file call.h.
◆ promise_
Object to set the result of this RPC.
Definition at line 91 of file call.h.
◆ timeout_timer_
Timer of timeout.
Definition at line 94 of file call.h.
The documentation for this class was generated from the following file:
- src/msgpack_rpc/clients/impl/call.h