summaryrefslogtreecommitdiff
path: root/test/HttpServerTest.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2016-01-09 18:16:08 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2016-01-09 18:17:04 +0900
commitea4d99ea087d8f1bafa812017efa26cb90d99947 (patch)
treef2a4b2e9cbbec1a2a98d5f452a230f116c47748a /test/HttpServerTest.cc
parente899eba76f7b8f91805176db4460f91e0a4dd487 (diff)
Refactor SocketCore::getPeerInfo, getAddrInfo to return Endpoint object
Diffstat (limited to 'test/HttpServerTest.cc')
-rw-r--r--test/HttpServerTest.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/HttpServerTest.cc b/test/HttpServerTest.cc
index 8667b827..7f457b7f 100644
--- a/test/HttpServerTest.cc
+++ b/test/HttpServerTest.cc
@@ -22,11 +22,10 @@ namespace {
std::unique_ptr<HttpServer> performHttpRequest(SocketCore& server,
std::string request)
{
- std::pair<std::string, uint16_t> addr;
- server.getAddrInfo(addr);
+ auto endpoint = server.getAddrInfo();
SocketCore client;
- client.establishConnection("localhost", addr.second);
+ client.establishConnection("localhost", endpoint.port);
while (!client.isWritable(0)) {
}