From 2c1a508c304ac8b3109b46ff524ec02e71829a3f Mon Sep 17 00:00:00 2001 From: Aki Date: Thu, 14 Oct 2021 23:58:34 +0200 Subject: Extended client by adding sample state mutation to daemon and lib --- daemon/src/daemon.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'daemon') diff --git a/daemon/src/daemon.cpp b/daemon/src/daemon.cpp index feb6570..352218d 100644 --- a/daemon/src/daemon.cpp +++ b/daemon/src/daemon.cpp @@ -9,5 +9,12 @@ int main(int, char **) server.bind("stop_server", []{ rpc::this_server().stop(); }); + int value = 0; + server.bind("set_value", [&value](int a){ + value = a; + }); + server.bind("get_value", [&value](){ + return value; + }); server.run(); } -- cgit v1.1