summaryrefslogtreecommitdiff
path: root/modules/remote/c++/remote_loopback_base.hpp
diff options
context:
space:
mode:
authorClaudius 'keldu' Holeksa <mail@keldu.de>2024-10-22 18:33:00 +0200
committerClaudius 'keldu' Holeksa <mail@keldu.de>2024-10-22 18:33:00 +0200
commit05a7fa9a2815b63b5b6f7eea107807e33aa62137 (patch)
treef810107a00dd88d8135be2db0fb4dafd736c9ad5 /modules/remote/c++/remote_loopback_base.hpp
parent98cf3372f2ed4e61ccb0acc522549aaa3d18fd59 (diff)
Trying to get the reference working
Diffstat (limited to 'modules/remote/c++/remote_loopback_base.hpp')
-rw-r--r--modules/remote/c++/remote_loopback_base.hpp21
1 files changed, 16 insertions, 5 deletions
diff --git a/modules/remote/c++/remote_loopback_base.hpp b/modules/remote/c++/remote_loopback_base.hpp
index 5e5e108..7a567b2 100644
--- a/modules/remote/c++/remote_loopback_base.hpp
+++ b/modules/remote/c++/remote_loopback_base.hpp
@@ -54,14 +54,19 @@ private:
template<typename Iface, typename Encoding, uint64_t I>
error_or<void> find_data_servers_ele(typename rpc_server<Iface,Encoding,rmt::Loopback>::DataServers& ret_val){
-
+ if
}
template<typename Iface, typename Encoding>
error_or<typename rpc_server<Iface, Encoding, rmt::Loopback>::DataServers> find_data_servers(){
typename rpc_server<Iface,Encoding,rmt::Loopback>::DataServers ret_val;
-
+ {
+ auto eov = find_data_servers_ele<Iface,Encoding,0u>(ret_val);
+ if(eov.is_error()){
+ return std::move(eov.get_error());
+ }
+ }
return ret_val;
}
@@ -77,15 +82,21 @@ public:
* Connect to a remote
*/
template<typename Iface, typename Encode>
- conveyor<rpc_client<Iface, Encode, rmt::Loopback>> connect(const remote_address<rmt::Loopback>& addr);
+ conveyor<rpc_client<Iface, Encode, rmt::Loopback>> rpc_connect(const remote_address<rmt::Loopback>& addr);
/**
* Start listening
*/
template<typename Iface, typename Encode>
- error_or<own<rpc_server<Iface, Encode, rmt::Loopback>>> rpc_listen(const remote_address<rmt::Loopback>& addr, typename rpc_server<Iface,Encode,rmt::Loopback>::InterfaceT iface){
+ error_or<own<rpc_server<Iface, Encode, rmt::Loopback>>> rpc_listen(remote_address<rmt::Loopback>& addr, typename rpc_server<Iface,Encode,rmt::Loopback>::InterfaceT iface){
+
+ auto eo_dat_srvs = find_data_servers<Iface,Encode>();
+ if(eo_dat_srvs.is_error()){
+ return std::move(eo_dat_srvs.get_error());
+ }
+ auto& dat_srvs = eo_dat_srvs.get_value();
- return heap<rpc_server<Iface,Encode,rmt::Loopback>>({*this}, addr, std::move(iface));
+ return heap<rpc_server<Iface,Encode,rmt::Loopback>>(*this, addr, std::move(iface), dat_srvs);
}
/**