2017-08-17 21:32:12 +08:00
|
|
|
#include "reactors_distributed.hpp"
|
2017-08-07 22:04:24 +08:00
|
|
|
|
|
|
|
int main(int argc, char *argv[]) {
|
|
|
|
google::InitGoogleLogging(argv[0]);
|
2017-08-22 23:13:12 +08:00
|
|
|
Distributed &distributed = Distributed::GetInstance();
|
2017-08-17 20:46:34 +08:00
|
|
|
distributed.network().StartClient(1);
|
|
|
|
auto channel = distributed.network().Resolve("127.0.0.1", 10000, "master", "main");
|
2017-08-07 22:04:24 +08:00
|
|
|
std::cout << channel << std::endl;
|
|
|
|
if (channel != nullptr) {
|
2017-08-23 21:16:26 +08:00
|
|
|
channel->Send<ReturnAddressMsg>("master", "main");
|
2017-08-07 22:04:24 +08:00
|
|
|
}
|
2017-08-17 20:46:34 +08:00
|
|
|
distributed.network().StopClient();
|
2017-08-07 22:04:24 +08:00
|
|
|
return 0;
|
|
|
|
}
|