blob: 00bee287de38e1894e0c031d8e81d4e439052313 (
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
#pragma once
#include <forstio/io/io.hpp>
namespace saw {
/**
*/
namespace rmt {
struct IoTcp {};
}
template<>
class remote_address<rmt::IoTcp> final {
private:
public:
remote_address(const std::string& addr) = default;
};
/**
* A device representing a remote server. Technically it's
* a logical distinction and not a physical.
*/
template<>
class remote<rmt::IoTcp> final {
private:
ref<network> net_;
public:
remote(ref<network> net__):
net_{net__}
{}
conveyor<own<remote_address<rmt::IoTcp>>> resolve_address(){
return heap<remote_address<rmt::IoTcp>>();
}
error_or<own<remote_address<rmt::IoTcp>>> parse_address(){
return heap<remote_address<rmt::IoTcp>>();
}
template<typename Schema, typename Encoding>
error_or<own<data_server<Schema, Encoding, rmt::IoTcp>>> data_listen(const remote_address<rmt::IoTcp>& addr){
return make_error<err::not_implemented>();
}
template<typename Schema, typename Encoding>
conveyor<own<data_client<Schema, Encoding, rmt::IoTcp>>> data_connect(const remote_address<rmt::IoTcp>& addr){
return make_error<err::not_implemented>();
}
};
template<typename Schema, typename Encoding>
class data_server<Schema, Encoding, rmt::IoTcp> final {
};
template<typename Interface, typename Encoding>
class rpc_server<Interface, Encoding, rmt::IoTcp> final {
};
}
|