summaryrefslogtreecommitdiff
path: root/c++/io_codec/rpc.h
blob: 67c4cec76bb7b60667fd3e82136351f598368c2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#pragma once

namespace saw {
namespace rmt {
struct Network {};
}

template<>
class remote<rmt::Network> {
private:
		std::string addr_str_;
public:
		remote(std::string addr_str);

		conveyor<rpc_client<rmt::Network>> create_client();
};

template<>
class rpc_client<rmt::Network> {
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);
};
}