diff options
author | Claudius "keldu" Holeksa <mail@keldu.de> | 2024-01-23 13:12:11 +0100 |
---|---|---|
committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2024-01-23 13:12:11 +0100 |
commit | 8dad985328e2183b224300aa992951131956fdb3 (patch) | |
tree | ceda3d9805335f36f571fb36585444ebdb421a02 /modules/io_codec/rpc.hpp | |
parent | a9d2025030d0a7641f4b0701bd4aff7d2db5aeb4 (diff) |
core,codec-json,codec-minecraft,codec-netcdf,codec,io-tls,io,io_codec,window,window-opengl:
Renamed file endings and changed includes
Diffstat (limited to 'modules/io_codec/rpc.hpp')
-rw-r--r-- | modules/io_codec/rpc.hpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/modules/io_codec/rpc.hpp b/modules/io_codec/rpc.hpp new file mode 100644 index 0000000..020bf96 --- /dev/null +++ b/modules/io_codec/rpc.hpp @@ -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); +}; +} |