memgraph/experimental/distributed/tests/network_client.cpp
Matej Ferencevic 2ba0f0cdea Initial version of distributed networking stack.
Reviewers: buda, lion

Reviewed By: buda

Subscribers: pullbot, zuza

Differential Revision: https://phabricator.memgraph.io/D636
2017-08-07 16:26:43 +02:00

16 lines
461 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(std::move(message));
}
system.network().StopClient();
return 0;
}