diff options
author | Claudius 'keldu' Holeksa <mail@keldu.de> | 2024-10-21 17:52:46 +0200 |
---|---|---|
committer | Claudius 'keldu' Holeksa <mail@keldu.de> | 2024-10-21 17:52:46 +0200 |
commit | f2a1a3f56768d9aa03796808206f067daa5e0aa0 (patch) | |
tree | dfda93c68047a36c89e2a7af2000337c18e5558b /modules/remote/c++/remote_loopback.hpp | |
parent | 545abfe5eb973c83ee38a799add02605c05af26d (diff) |
Working towards proper rpc reference example
Diffstat (limited to 'modules/remote/c++/remote_loopback.hpp')
-rw-r--r-- | modules/remote/c++/remote_loopback.hpp | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/modules/remote/c++/remote_loopback.hpp b/modules/remote/c++/remote_loopback.hpp index 308bdc6..8763b68 100644 --- a/modules/remote/c++/remote_loopback.hpp +++ b/modules/remote/c++/remote_loopback.hpp @@ -53,22 +53,35 @@ class rpc_client<Iface, Encoding, rmt::Loopback> { */ }; - template<typename Iface, typename Encode> class rpc_server<Iface, Encode, rmt::Loopback> { public: using InterfaceT = interface<Iface, Encode>; + using TypeGroup = typename schema_iface_type_group<Iface>::Type; + using DataServers = typename impl::tmpl_group_to_data_server_ptr_std_tuple<TypeGroup>::type; private: - const remote_address<rmt::Loopback>* addr_; + ptr<remote<rmt::Loopback>> remote_; + const ptr<remote_address<rmt::Loopback>> addr_; InterfaceT iface_; + DataServers dat_srvs_; + public: - rpc_server(const remote_address<rmt::Loopback>& addr__, InterfaceT iface__): - addr_{&addr__}, - iface_{std::move(iface__)} + rpc_server(ptr<remote<rmt::Loopback>> remote__, const remote_address<rmt::Loopback>& addr__, InterfaceT iface__, DataServers data_srvs__): + remote_{remote__}, + addr_{addr__}, + iface_{std::move(iface__)}, + data_srvs_{data_srvs__} {} - // error_or<id<>> - // conveyor<> call + template<string_literal Lit> + error_or< + id< + typename schema_member_type<Lit, Iface>::type::Response + > + > call(id<schema_member_type<Lit, Iface>::type::Request> id_param){ + + return make_error<err::not_implemented>(); + } }; } |