summaryrefslogtreecommitdiff
path: root/library/src
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2021-10-14 22:51:43 +0200
committerAki <please@ignore.pl>2021-10-14 22:51:43 +0200
commit0dd0ba272f247ca6e9b7948b648e42ff544c71ac (patch)
tree81d291a87456a6909d311f4b31ce6f56c5490dac /library/src
downloadhwd-0dd0ba272f247ca6e9b7948b648e42ff544c71ac.zip
hwd-0dd0ba272f247ca6e9b7948b648e42ff544c71ac.tar.gz
hwd-0dd0ba272f247ca6e9b7948b648e42ff544c71ac.tar.bz2
Created stub daemon with a communication library
Diffstat (limited to 'library/src')
-rw-r--r--library/src/library.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/library/src/library.cpp b/library/src/library.cpp
new file mode 100644
index 0000000..4691849
--- /dev/null
+++ b/library/src/library.cpp
@@ -0,0 +1,19 @@
+#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");
+}
+
+} // namespace hwd