diff options
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>(); + } }; } |