memgraph/experimental/distributed/tests/network_client.cpp
Goran Zuzic 045e14e139 Callback interface consistency changes
Summary:
1. add a test for unsubscription service
2. change the callback to accept const subscription&
3. renamed Send -> SendHelper
4. created a more usable Send
5. changed the Send usages

Reviewers: buda, lion, sasa.stanko

Reviewed By: sasa.stanko

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D647
2017-08-08 17:22:26 +02:00

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