cpp-msgpack-rpc 0.2.0
An RPC library implementing MessagePack RPC.
Loading...
Searching...
No Matches
msgpack_rpc::clients::CallFuture< void > Class Reference

Specialization of msgpack_rpc::clients::CallFuture for void type. More...

#include <msgpack_rpc/clients/call_future.h>

Inheritance diagram for msgpack_rpc::clients::CallFuture< void >:
Collaboration diagram for msgpack_rpc::clients::CallFuture< void >:

Public Member Functions

 CallFuture (std::shared_ptr< impl::ICallFutureImpl > impl)
 Constructor.
void get_result ()
 Get the result of RPC.
void get_result_within (std::chrono::nanoseconds timeout)
 Get the result of RPC within a timeout.

Static Private Member Functions

static void get_from_call_result (const messages::CallResult &call_result)
 Get the result from CallResult object.

Private Attributes

std::shared_ptr< impl::ICallFutureImplimpl_
 Object of the internal implementation.

Detailed Description

Specialization of msgpack_rpc::clients::CallFuture for void type.

Objects of this class are created by Client::async_call function.

Definition at line 110 of file call_future.h.

Constructor & Destructor Documentation

◆ CallFuture()

msgpack_rpc::clients::CallFuture< void >::CallFuture ( std::shared_ptr< impl::ICallFutureImpl > impl)
inlineexplicit

Constructor.

Parameters
[in]implObject of the internal implementation.
Warning
Users should create objects of this class using Client::async_call function.

Definition at line 120 of file call_future.h.

Member Function Documentation

◆ get_from_call_result()

void msgpack_rpc::clients::CallFuture< void >::get_from_call_result ( const messages::CallResult & call_result)
inlinestaticprivate

Get the result from CallResult object.

Parameters
[in]call_resultCallResult object.

Definition at line 152 of file call_future.h.

◆ get_result()

void msgpack_rpc::clients::CallFuture< void >::get_result ( )
inline

Get the result of RPC.

Note
This function will wait for the result if not received.

Definition at line 128 of file call_future.h.

◆ get_result_within()

void msgpack_rpc::clients::CallFuture< void >::get_result_within ( std::chrono::nanoseconds timeout)
inline

Get the result of RPC within a timeout.

Parameters
[in]timeoutTimeout.
Note
This function will wait for the result if not received, and throw an exception when no result can be received within the given timeout.

Definition at line 141 of file call_future.h.

Member Data Documentation

◆ impl_

std::shared_ptr<impl::ICallFutureImpl> msgpack_rpc::clients::CallFuture< void >::impl_
private

Object of the internal implementation.

Definition at line 160 of file call_future.h.


The documentation for this class was generated from the following file: