diff options
author | Claudius 'keldu' Holeksa <mail@keldu.de> | 2024-08-14 21:58:31 +0200 |
---|---|---|
committer | Claudius 'keldu' Holeksa <mail@keldu.de> | 2024-08-14 21:58:31 +0200 |
commit | 698eb31e87d398742dd1c6654d151c215b2e3112 (patch) | |
tree | e5594205c249d66e915cf817bbe042688847cd35 /modules/remote-filesystem/c++/transfer.hpp | |
parent | 0e80c34f73ab0cf986675b1ac5e78e6f14eca623 (diff) |
wip
Diffstat (limited to 'modules/remote-filesystem/c++/transfer.hpp')
-rw-r--r-- | modules/remote-filesystem/c++/transfer.hpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/modules/remote-filesystem/c++/transfer.hpp b/modules/remote-filesystem/c++/transfer.hpp index 26a2b7b..6cca08b 100644 --- a/modules/remote-filesystem/c++/transfer.hpp +++ b/modules/remote-filesystem/c++/transfer.hpp @@ -102,4 +102,30 @@ public: return dat; } }; + +/* +template <typename Schema, typename Encoding> +class data_client<Schema, Encoding, rmt::File> { +private: + ptr<remote<rmt::File>> remote_; + ptr<data_server<Schema, Encoding, rmt::File>> srv_; +public: + data_client(ptr<remote<rmt::File>> remote__, ptr<data_server<Schema, Encoding,rmt::File>> srv__): + remote_{remote__}, + srv_{srv__} + {} + + error_or<id<Schema>> send(data<Schema, Encoding>& dat){ + auto eov = srv_->send(data, {0u}); + if(eov.is_error()){ + return std::move(eov.get_error()); + } + return id<Schema>{0u}; + } + + error_or<data<Schema, Encoding>> receive(id<Schema> id_ = {0u}){ + return srv_->receive(id_); + } +}; +*/ } |