summaryrefslogtreecommitdiff
path: root/modules/io_codec/rpc.h
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2023-12-04 12:18:14 +0100
committerClaudius "keldu" Holeksa <mail@keldu.de>2023-12-04 12:18:14 +0100
commita14896f9ed209dd3f9597722e5a5697bd7dbf531 (patch)
tree089ca5cbbd206d1921f8f6b53292f5bc1902ca5c /modules/io_codec/rpc.h
parent84ecdcbca9e55b1f57fbb832e12ff4fdbb86e7c9 (diff)
meta: Renamed folder containing source
Diffstat (limited to 'modules/io_codec/rpc.h')
-rw-r--r--modules/io_codec/rpc.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/modules/io_codec/rpc.h b/modules/io_codec/rpc.h
new file mode 100644
index 0000000..020bf96
--- /dev/null
+++ b/modules/io_codec/rpc.h
@@ -0,0 +1,31 @@
+#pragma once
+
+#include <forstio/codec/rpc.h>
+
+namespace saw {
+namespace rmt {
+struct Network {};
+}
+
+template<>
+class remote<rmt::Network> {
+private:
+ std::string addr_str_;
+public:
+ remote(std::string addr_str);
+
+ template<typename Interface>
+ conveyor<rpc_client<rmt::Network, Interface>> create_client();
+};
+
+template<template Interface>
+class rpc_client<rmt::Network, Interface> {
+private:
+ own<io_stream> stream_;
+public:
+ rpc_client(own<io_stream> stream);
+
+ template<typename T>
+ remote_result<typename response<T>::type> call(typename request<T>::type req);
+};
+}