blob: cdade0029c4350edf4b3bd4494a6792c2b06a31c (
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
|
#pragma once
#include <forstio/codec/rpc.hpp>
namespace saw {
namespace rmt {
struct Network {};
}
template<>
class remote<rmt::Network> {
private:
std::string addr_str_;
public:
remote(std::string addr_str);
template<typename Interface>
conveyor<rpc_client<rmt::Network, Interface>> connect();
template<typename Interface>
conveyor<rpc_server<rmt::Network, Interface>> listen(network& net){
}
};
template<typename Interface>
class rpc_server<rmt::Network, Interface> {
private:
public:
};
template<template Interface>
class rpc_client<rmt::Network, Interface> {
private:
own<async_io_stream> stream_;
public:
rpc_client(own<async_io_stream> stream);
template<typename T>
remote_result<typename response<T>::type> call(typename request<T>::type req);
};
}
|