Class of clients.
More...
#include <msgpack_rpc/clients/client.h>
Class of clients.
Clients can be created using ClientBuilder.
- Examples
- more_client.cpp, and simple_client.cpp.
Definition at line 39 of file client.h.
◆ Client()
Constructor.
- Parameters
-
[in] | impl | Object of the internal implementation. |
- Warning
- Users should create clients using ClientBuilder instead of this constructor.
Definition at line 49 of file client.h.
◆ async_call()
template<typename Result, typename... Parameters>
Asynchronously call a method.
- Template Parameters
-
Result | Type of the result. |
Parameters | Types of parameters. |
- Parameters
-
[in] | method_name | Name of the method. |
[in] | parameters | Parameters. |
- Returns
- Future object to get the result of the RPC.
- Examples
- more_client.cpp.
Definition at line 70 of file client.h.
◆ call()
template<typename Result, typename... Parameters>
std::decay_t< Result > msgpack_rpc::clients::Client::call |
( |
messages::MethodNameView | method_name, |
|
|
const Parameters &... | parameters ) |
|
inline |
Synchronously call a method.
- Template Parameters
-
Result | Type of the result. |
Parameters | Types of parameters. |
- Parameters
-
[in] | method_name | Name of the method. |
[in] | parameters | Parameters. |
- Returns
- Result of the RPC.
- Exceptions
-
- Examples
- more_client.cpp, and simple_client.cpp.
Definition at line 89 of file client.h.
◆ executor()
Get the executor.
- Returns
- Executor.
- Note
- This function is mainly for testing. So this function may be removed in the future.
Definition at line 119 of file client.h.
◆ notify()
template<typename... Parameters>
Notify to a method.
- Template Parameters
-
Parameters | Types of parameters. |
- Parameters
-
[in] | method_name | Name of the method. |
[in] | parameters | Parameters. |
- Note
- Notifications are always processed asynchronously because a notification doesn't have a response.
- Examples
- more_client.cpp.
Definition at line 105 of file client.h.
◆ stop()
void msgpack_rpc::clients::Client::stop |
( |
| ) |
|
|
inline |
Stop processing of this client.
- Note
- Destructing this client without call of this function will automatically stop this client internally.
Definition at line 58 of file client.h.
◆ impl_
Object of the internal implementation.
Definition at line 125 of file client.h.
The documentation for this class was generated from the following file: