blob: 73f40f986005518fdc356ba8bceeebe69849f849 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#include <rpc/client.h>
#include <hwd/internal.h>
namespace hwd
{
static rpc::client & get_client()
{
static rpc::client c("127.0.0.1", hwd::internal::default_port);
return c;
}
void stop_server()
{
get_client().call("stop_server");
}
void set_value(const int value)
{
get_client().call("set_value", value);
}
int get_value()
{
return get_client().call("get_value").as<int>();
}
} // namespace hwd
|