Get rid of the last use of ndn::dns in NFD

Change-Id: I9a3188379a4755f5535af05a860a2e3a12ddc8ba
Refs: #2422
diff --git a/daemon/face/websocket-factory.hpp b/daemon/face/websocket-factory.hpp
index 75ff009..a522036 100644
--- a/daemon/face/websocket-factory.hpp
+++ b/daemon/face/websocket-factory.hpp
@@ -29,7 +29,6 @@
 #include "protocol-factory.hpp"
 #include "websocket-channel.hpp"
 
-
 namespace nfd {
 
 class WebSocketFactory : public ProtocolFactory
@@ -63,8 +62,7 @@
    * \returns always a valid pointer to a WebSocketChannel object, an exception
    *          is thrown if it cannot be created.
    *
-   * \throws WebSocketFactory::Error, TcpResolver::Error
-   *
+   * \throws WebSocketFactory::Error
    */
   shared_ptr<WebSocketChannel>
   createChannel(const websocket::Endpoint& localEndpoint);
@@ -80,7 +78,7 @@
   shared_ptr<WebSocketChannel>
   createChannel(const std::string& localIp, const std::string& port);
 
-  // from Factory
+  // from ProtocolFactory
   virtual void
   createFace(const FaceUri& uri,
              const FaceCreatedCallback& onCreated,
@@ -90,7 +88,6 @@
   getChannels() const;
 
 private:
-
   /**
    * \brief Look up WebSocketChannel using specified local endpoint
    *
diff --git a/tests/daemon/face/tcp.t.cpp b/tests/daemon/face/tcp.t.cpp
index 9ee9881..dc788fc 100644
--- a/tests/daemon/face/tcp.t.cpp
+++ b/tests/daemon/face/tcp.t.cpp
@@ -34,7 +34,6 @@
 #include "packet-datasets.hpp"
 
 #include <ndn-cxx/security/key-chain.hpp>
-#include <ndn-cxx/util/dns.hpp>
 
 namespace nfd {
 namespace tests {
@@ -550,14 +549,14 @@
                                  CorruptedPackets, SimpleEndToEndFixture)
 {
   TcpFactory factory;
+  tcp::Endpoint endpoint(boost::asio::ip::address_v4::from_string("127.0.0.1"), 20070);
 
-  shared_ptr<TcpChannel> channel = factory.createChannel("127.0.0.1", "20070");
+  shared_ptr<TcpChannel> channel = factory.createChannel(endpoint);
   channel->listen(bind(&SimpleEndToEndFixture::onFaceCreated,   this, _1),
                   bind(&SimpleEndToEndFixture::onConnectFailed, this, _1));
   BOOST_REQUIRE_EQUAL(channel->isListening(), true);
 
   DummyStreamSender<boost::asio::ip::tcp, Dataset> sender;
-  tcp::Endpoint endpoint(boost::asio::ip::address::from_string("127.0.0.1"), 20070);
   sender.start(endpoint);
 
   BOOST_CHECK_MESSAGE(limitedIo.run(LimitedIo::UNLIMITED_OPS,
@@ -568,29 +567,29 @@
 BOOST_FIXTURE_TEST_CASE_TEMPLATE(FaceCorruptedInput, Dataset,
                                  CorruptedPackets, SimpleEndToEndFixture)
 {
-  // tests with non-local Face
-  std::string someIpv4Address;
+  // test with non-local Face
+  boost::asio::ip::address_v4 someIpv4Address;
   for (const auto& netif : listNetworkInterfaces()) {
     if (!netif.isLoopback() && netif.isUp() && !netif.ipv4Addresses.empty()) {
-      someIpv4Address = netif.ipv4Addresses[0].to_string();
+      someIpv4Address = netif.ipv4Addresses.front();
       break;
     }
   }
-  if (someIpv4Address.empty()) {
+  if (someIpv4Address.is_unspecified()) {
     BOOST_TEST_MESSAGE("Test with non-local Face cannot be run "
-                       "(no non-local interface with IPv4 address available)");
+                       "(no non-loopback interface with IPv4 address found)");
     return;
   }
 
   TcpFactory factory;
+  tcp::Endpoint endpoint(someIpv4Address, 20070);
 
-  shared_ptr<TcpChannel> channel = factory.createChannel(someIpv4Address, "20070");
+  shared_ptr<TcpChannel> channel = factory.createChannel(endpoint);
   channel->listen(bind(&SimpleEndToEndFixture::onFaceCreated,   this, _1),
                   bind(&SimpleEndToEndFixture::onConnectFailed, this, _1));
   BOOST_REQUIRE_EQUAL(channel->isListening(), true);
 
   DummyStreamSender<boost::asio::ip::tcp, Dataset> sender;
-  tcp::Endpoint endpoint(ndn::dns::syncResolve(someIpv4Address, getGlobalIoService()), 20070);
   sender.start(endpoint);
 
   BOOST_CHECK_MESSAGE(limitedIo.run(LimitedIo::UNLIMITED_OPS,