Rename NetworkEndpoint

Summary:
Rename redunant port str

Add endpoint << operator

Migrate everything to endpoint

Reviewers: mferencevic, florijan

Reviewed By: mferencevic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1100
This commit is contained in:
Dominik Gleich
2018-01-15 14:03:07 +01:00
parent 41679b6ec5
commit 5418dfb19e
49 changed files with 342 additions and 348 deletions

View File

@@ -3,6 +3,7 @@
#endif
#include <chrono>
#include <iostream>
#include "network_common.hpp"
@@ -17,8 +18,8 @@ TEST(Network, SessionLeak) {
initialize_data(data, SIZE);
// initialize listen socket
NetworkEndpoint endpoint(interface, "0");
printf("ADDRESS: %s, PORT: %d\n", endpoint.address(), endpoint.port());
Endpoint endpoint(interface, 0);
std::cout << endpoint << std::endl;
// initialize server
TestData session_data;
@@ -31,7 +32,7 @@ TEST(Network, SessionLeak) {
const auto &ep = server.endpoint();
int testlen = 3000;
for (int i = 0; i < N; ++i) {
clients.push_back(std::thread(client_run, i, interface, ep.port_str(), data,
clients.push_back(std::thread(client_run, i, interface, ep.port(), data,
testlen, testlen));
std::this_thread::sleep_for(10ms);
}