summaryrefslogtreecommitdiff
path: root/daemon
diff options
context:
space:
mode:
Diffstat (limited to 'daemon')
-rw-r--r--daemon/CMakeLists.txt12
-rw-r--r--daemon/src/daemon.cpp13
2 files changed, 25 insertions, 0 deletions
diff --git a/daemon/CMakeLists.txt b/daemon/CMakeLists.txt
new file mode 100644
index 0000000..831dae3
--- /dev/null
+++ b/daemon/CMakeLists.txt
@@ -0,0 +1,12 @@
+project(daemon CXX)
+add_executable(${PROJECT_NAME}
+ src/daemon.cpp
+ )
+target_link_libraries(${PROJECT_NAME}
+ PRIVATE rpclib::rpc
+ PRIVATE Threads::Threads
+ PRIVATE common
+ )
+install(TARGETS ${PROJECT_NAME}
+ RUNTIME
+ )
diff --git a/daemon/src/daemon.cpp b/daemon/src/daemon.cpp
new file mode 100644
index 0000000..feb6570
--- /dev/null
+++ b/daemon/src/daemon.cpp
@@ -0,0 +1,13 @@
+#include <rpc/server.h>
+#include <rpc/this_server.h>
+
+#include <hwd/internal.h>
+
+int main(int, char **)
+{
+ rpc::server server(hwd::internal::default_port);
+ server.bind("stop_server", []{
+ rpc::this_server().stop();
+ });
+ server.run();
+}