memgraph/experimental/distributed/tests/network_client.cpp
Goran Zuzic 6ce504349f Adding callback by type (Work in Progress)
Summary:
Merge branch 'dev' of https://phabricator.memgraph.io/diffusion/MG/memgraph into dev

Finished adding callback by type.

Reviewers: buda, lion, sasa.stanko

Reviewed By: sasa.stanko

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D644
2017-08-08 15:56:49 +02:00

16 lines
484 B
C++

#include "communication.hpp"
int main(int argc, char *argv[]) {
google::InitGoogleLogging(argv[0]);
System system;
system.network().StartClient(1);
auto channel = system.network().Resolve("127.0.0.1", 10000, "master", "main");
std::cout << channel << std::endl;
if (channel != nullptr) {
auto message = std::make_unique<SenderMessage>("master", "main");
channel->Send(typeid(SenderMessage), std::move(message));
}
system.network().StopClient();
return 0;
}