face: group parameters to createFace and connect into a common structure
Change-Id: Icb6857602ed7e897be6c5334b05be23793d133bb
diff --git a/tests/daemon/face/ethernet-channel.t.cpp b/tests/daemon/face/ethernet-channel.t.cpp
index 3cb705a..9e70441 100644
--- a/tests/daemon/face/ethernet-channel.t.cpp
+++ b/tests/daemon/face/ethernet-channel.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2017, Regents of the University of California,
+ * Copyright (c) 2014-2018, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -76,9 +76,7 @@
BOOST_CHECK_EQUAL(channel->size(), 0);
shared_ptr<nfd::Face> face;
- channel->connect({0x00, 0x00, 0x5e, 0x00, 0x53, 0x5e},
- ndn::nfd::FACE_PERSISTENCY_PERSISTENT,
- false,
+ channel->connect({0x00, 0x00, 0x5e, 0x00, 0x53, 0x5e}, {},
[&face] (const shared_ptr<nfd::Face>& newFace) {
BOOST_REQUIRE(newFace != nullptr);
face = newFace;
diff --git a/tests/daemon/face/ethernet-factory.t.cpp b/tests/daemon/face/ethernet-factory.t.cpp
index bb0f119..8bdc139 100644
--- a/tests/daemon/face/ethernet-factory.t.cpp
+++ b/tests/daemon/face/ethernet-factory.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2017, Regents of the University of California,
+ * Copyright (c) 2014-2018, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -439,9 +439,7 @@
createFace(factory,
FaceUri("ether://[00:00:5e:00:53:5e]"),
FaceUri("dev://eth0"),
- ndn::nfd::FACE_PERSISTENCY_PERSISTENT,
- false,
- false,
+ {ndn::nfd::FACE_PERSISTENCY_PERSISTENT, false, false},
{CreateFaceExpectedResult::FAILURE, 504, "No channels available to connect"});
SKIP_IF_ETHERNET_NETIF_COUNT_LT(1);
@@ -450,33 +448,25 @@
createFace(factory,
FaceUri("ether://[00:00:5e:00:53:5e]"),
localUri,
- ndn::nfd::FACE_PERSISTENCY_PERSISTENT,
- false,
- false,
+ {ndn::nfd::FACE_PERSISTENCY_PERSISTENT, false, false},
{CreateFaceExpectedResult::SUCCESS, 0, ""});
createFace(factory,
FaceUri("ether://[00:00:5e:00:53:5e]"),
localUri,
- ndn::nfd::FACE_PERSISTENCY_PERMANENT,
- false,
- false,
+ {ndn::nfd::FACE_PERSISTENCY_PERMANENT, false, false},
{CreateFaceExpectedResult::SUCCESS, 0, ""});
createFace(factory,
FaceUri("ether://[00:00:5e:00:53:53]"),
localUri,
- ndn::nfd::FACE_PERSISTENCY_PERMANENT,
- false,
- false,
+ {ndn::nfd::FACE_PERSISTENCY_PERMANENT, false, false},
{CreateFaceExpectedResult::SUCCESS, 0, ""});
createFace(factory,
FaceUri("ether://[00:00:5e:00:53:57]"),
localUri,
- ndn::nfd::FACE_PERSISTENCY_PERMANENT,
- false,
- true,
+ {ndn::nfd::FACE_PERSISTENCY_PERMANENT, false, true},
{CreateFaceExpectedResult::SUCCESS, 0, ""});
}
@@ -485,45 +475,35 @@
createFace(factory,
FaceUri("ether://[00:00:5e:00:53:5e]"),
{},
- ndn::nfd::FACE_PERSISTENCY_PERSISTENT,
- false,
- false,
+ {ndn::nfd::FACE_PERSISTENCY_PERSISTENT, false, false},
{CreateFaceExpectedResult::FAILURE, 406,
"Creation of unicast Ethernet faces requires a LocalUri with dev:// scheme"});
createFace(factory,
FaceUri("ether://[00:00:5e:00:53:5e]"),
FaceUri("udp4://127.0.0.1:20071"),
- ndn::nfd::FACE_PERSISTENCY_PERSISTENT,
- false,
- false,
+ {ndn::nfd::FACE_PERSISTENCY_PERSISTENT, false, false},
{CreateFaceExpectedResult::FAILURE, 406,
"Creation of unicast Ethernet faces requires a LocalUri with dev:// scheme"});
createFace(factory,
FaceUri("ether://[00:00:5e:00:53:5e]"),
FaceUri("dev://eth0"),
- ndn::nfd::FACE_PERSISTENCY_ON_DEMAND,
- false,
- false,
+ {ndn::nfd::FACE_PERSISTENCY_ON_DEMAND, false, false},
{CreateFaceExpectedResult::FAILURE, 406,
"Outgoing Ethernet faces do not support on-demand persistency"});
createFace(factory,
FaceUri("ether://[01:00:5e:90:10:5e]"),
FaceUri("dev://eth0"),
- ndn::nfd::FACE_PERSISTENCY_PERSISTENT,
- false,
- false,
+ {ndn::nfd::FACE_PERSISTENCY_PERSISTENT, false, false},
{CreateFaceExpectedResult::FAILURE, 406,
"Cannot create multicast Ethernet faces"});
createFace(factory,
FaceUri("ether://[00:00:5e:00:53:5e]"),
FaceUri("dev://eth0"),
- ndn::nfd::FACE_PERSISTENCY_PERSISTENT,
- true,
- false,
+ {ndn::nfd::FACE_PERSISTENCY_PERSISTENT, true, false},
{CreateFaceExpectedResult::FAILURE, 406,
"Local fields can only be enabled on faces with local scope"});
}
diff --git a/tests/daemon/face/face-system.t.cpp b/tests/daemon/face/face-system.t.cpp
index 1ecf33a..b22979a 100644
--- a/tests/daemon/face/face-system.t.cpp
+++ b/tests/daemon/face/face-system.t.cpp
@@ -47,7 +47,7 @@
void
processConfig(OptionalConfigSection configSection,
- FaceSystem::ConfigContext& context) override
+ FaceSystem::ConfigContext& context) final
{
processConfigHistory.push_back({configSection, context.isDryRun,
context.generalConfig.wantCongestionMarking});
@@ -57,15 +57,15 @@
}
void
- createFace(const CreateFaceParams& params,
+ createFace(const CreateFaceRequest& req,
const FaceCreatedCallback& onCreated,
- const FaceCreationFailedCallback& onFailure) override
+ const FaceCreationFailedCallback& onFailure) final
{
BOOST_FAIL("createFace should not be called");
}
std::vector<shared_ptr<const Channel>>
- getChannels() const override
+ getChannels() const final
{
BOOST_FAIL("getChannels should not be called");
return {};
diff --git a/tests/daemon/face/factory-test-common.hpp b/tests/daemon/face/factory-test-common.hpp
index 83cf899..6ea56bf 100644
--- a/tests/daemon/face/factory-test-common.hpp
+++ b/tests/daemon/face/factory-test-common.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2017, Regents of the University of California,
+ * Copyright (c) 2014-2018, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -34,6 +34,17 @@
namespace face {
namespace tests {
+struct TestFaceParams : public FaceParams
+{
+ TestFaceParams(ndn::nfd::FacePersistency persistency, bool wantLocalFields,
+ bool wantLpReliability) noexcept
+ {
+ this->persistency = persistency;
+ this->wantLocalFields = wantLocalFields;
+ this->wantLpReliability = wantLpReliability;
+ }
+};
+
struct CreateFaceExpectedResult
{
enum { FAILURE, SUCCESS } result;
@@ -45,12 +56,10 @@
createFace(ProtocolFactory& factory,
const FaceUri& remoteUri,
const ndn::optional<FaceUri>& localUri,
- ndn::nfd::FacePersistency persistency,
- bool wantLocalFields,
- bool wantLpReliability,
+ const TestFaceParams& params,
const CreateFaceExpectedResult& expected)
{
- factory.createFace({remoteUri, localUri, persistency, wantLocalFields, wantLpReliability},
+ factory.createFace({remoteUri, localUri, params},
[expected] (const shared_ptr<Face>&) {
BOOST_CHECK_EQUAL(CreateFaceExpectedResult::SUCCESS, expected.result);
},
diff --git a/tests/daemon/face/tcp-channel-fixture.hpp b/tests/daemon/face/tcp-channel-fixture.hpp
index ed91aee..732ad22 100644
--- a/tests/daemon/face/tcp-channel-fixture.hpp
+++ b/tests/daemon/face/tcp-channel-fixture.hpp
@@ -50,7 +50,7 @@
connect(TcpChannel& channel) final
{
g_io.post([&] {
- channel.connect(listenerEp, ndn::nfd::FACE_PERSISTENCY_PERSISTENT, false, false,
+ channel.connect(listenerEp, {},
[this] (const shared_ptr<Face>& newFace) {
BOOST_REQUIRE(newFace != nullptr);
connectFaceClosedSignal(*newFace, [this] { limitedIo.afterOp(); });
diff --git a/tests/daemon/face/tcp-channel.t.cpp b/tests/daemon/face/tcp-channel.t.cpp
index c3ebf9c..1c2b170 100644
--- a/tests/daemon/face/tcp-channel.t.cpp
+++ b/tests/daemon/face/tcp-channel.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2017, Regents of the University of California,
+ * Copyright (c) 2014-2018, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -46,8 +46,7 @@
// do not listen
auto channel = this->makeChannel(typename IpAddressFromFamily<F::value>::type());
- channel->connect(tcp::Endpoint(address, 7040),
- ndn::nfd::FACE_PERSISTENCY_PERSISTENT, false, false,
+ channel->connect(tcp::Endpoint(address, 7040), {},
[this] (const shared_ptr<nfd::Face>&) {
BOOST_FAIL("Connect succeeded when it should have failed");
this->limitedIo.afterOp();
diff --git a/tests/daemon/face/tcp-factory.t.cpp b/tests/daemon/face/tcp-factory.t.cpp
index 39567d6..934229f 100644
--- a/tests/daemon/face/tcp-factory.t.cpp
+++ b/tests/daemon/face/tcp-factory.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2017, Regents of the University of California,
+ * Copyright (c) 2014-2018, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -172,9 +172,7 @@
createFace(factory,
FaceUri("tcp4://127.0.0.1:6363"),
{},
- ndn::nfd::FACE_PERSISTENCY_PERSISTENT,
- false,
- false,
+ {ndn::nfd::FACE_PERSISTENCY_PERSISTENT, false, false},
{CreateFaceExpectedResult::FAILURE, 504, "No channels available to connect"});
createChannel("127.0.0.1", "20071");
@@ -182,33 +180,25 @@
createFace(factory,
FaceUri("tcp4://127.0.0.1:6363"),
{},
- ndn::nfd::FACE_PERSISTENCY_PERSISTENT,
- false,
- false,
+ {ndn::nfd::FACE_PERSISTENCY_PERSISTENT, false, false},
{CreateFaceExpectedResult::SUCCESS, 0, ""});
createFace(factory,
FaceUri("tcp4://127.0.0.1:6363"),
{},
- ndn::nfd::FACE_PERSISTENCY_PERMANENT,
- false,
- false,
+ {ndn::nfd::FACE_PERSISTENCY_PERMANENT, false, false},
{CreateFaceExpectedResult::SUCCESS, 0, ""});
createFace(factory,
FaceUri("tcp4://127.0.0.1:20072"),
{},
- ndn::nfd::FACE_PERSISTENCY_PERMANENT,
- false,
- false,
+ {ndn::nfd::FACE_PERSISTENCY_PERMANENT, false, false},
{CreateFaceExpectedResult::SUCCESS, 0, ""});
createFace(factory,
FaceUri("tcp4://127.0.0.1:20073"),
{},
- ndn::nfd::FACE_PERSISTENCY_PERSISTENT,
- false,
- true,
+ {ndn::nfd::FACE_PERSISTENCY_PERSISTENT, false, true},
{CreateFaceExpectedResult::SUCCESS, 0, ""});
}
@@ -219,27 +209,21 @@
createFace(factory,
FaceUri("tcp4://127.0.0.1:20072"),
FaceUri("tcp4://127.0.0.1:20071"),
- ndn::nfd::FACE_PERSISTENCY_PERSISTENT,
- false,
- false,
+ {ndn::nfd::FACE_PERSISTENCY_PERSISTENT, false, false},
{CreateFaceExpectedResult::FAILURE, 406,
"Unicast TCP faces cannot be created with a LocalUri"});
createFace(factory,
FaceUri("tcp4://127.0.0.1:20072"),
{},
- ndn::nfd::FACE_PERSISTENCY_ON_DEMAND,
- false,
- false,
+ {ndn::nfd::FACE_PERSISTENCY_ON_DEMAND, false, false},
{CreateFaceExpectedResult::FAILURE, 406,
"Outgoing TCP faces do not support on-demand persistency"});
createFace(factory,
FaceUri("tcp4://198.51.100.100:6363"),
{},
- ndn::nfd::FACE_PERSISTENCY_PERSISTENT,
- true,
- false,
+ {ndn::nfd::FACE_PERSISTENCY_PERSISTENT, true, false},
{CreateFaceExpectedResult::FAILURE, 406,
"Local fields can only be enabled on faces with local scope"});
}
@@ -272,13 +256,11 @@
BOOST_FIXTURE_TEST_CASE(CreateFaceTimeout, CreateFaceTimeoutFixture)
{
createChannel("0.0.0.0", "20070");
-
- factory.createFace({FaceUri("tcp4://192.0.2.1:20070"), {},
- ndn::nfd::FACE_PERSISTENCY_PERSISTENT, false, false},
+ factory.createFace({FaceUri("tcp4://192.0.2.1:20070"), {}, {}},
bind(&CreateFaceTimeoutFixture::onFaceCreated, this, _1),
bind(&CreateFaceTimeoutFixture::onConnectFailed, this, _2));
- BOOST_REQUIRE_EQUAL(limitedIo.run(1, time::seconds(10)), LimitedIo::EXCEED_OPS);
+ BOOST_REQUIRE_EQUAL(limitedIo.run(1, 10_s), LimitedIo::EXCEED_OPS);
BOOST_CHECK(face == nullptr);
}
diff --git a/tests/daemon/face/udp-channel-fixture.hpp b/tests/daemon/face/udp-channel-fixture.hpp
index ddf22f7..708813a 100644
--- a/tests/daemon/face/udp-channel-fixture.hpp
+++ b/tests/daemon/face/udp-channel-fixture.hpp
@@ -51,7 +51,7 @@
connect(UdpChannel& channel) final
{
g_io.post([&] {
- channel.connect(listenerEp, ndn::nfd::FACE_PERSISTENCY_PERSISTENT, false,
+ channel.connect(listenerEp, {},
[this] (const shared_ptr<Face>& newFace) {
BOOST_REQUIRE(newFace != nullptr);
connectFaceClosedSignal(*newFace, [this] { limitedIo.afterOp(); });
diff --git a/tests/daemon/face/udp-factory.t.cpp b/tests/daemon/face/udp-factory.t.cpp
index 4ef1451..7303f5c 100644
--- a/tests/daemon/face/udp-factory.t.cpp
+++ b/tests/daemon/face/udp-factory.t.cpp
@@ -877,9 +877,7 @@
createFace(factory,
FaceUri("udp4://127.0.0.1:6363"),
{},
- ndn::nfd::FACE_PERSISTENCY_PERSISTENT,
- false,
- false,
+ {ndn::nfd::FACE_PERSISTENCY_PERSISTENT, false, false},
{CreateFaceExpectedResult::FAILURE, 504, "No channels available to connect"});
createChannel("127.0.0.1", 20071);
@@ -887,33 +885,25 @@
createFace(factory,
FaceUri("udp4://127.0.0.1:6363"),
{},
- ndn::nfd::FACE_PERSISTENCY_PERSISTENT,
- false,
- false,
+ {ndn::nfd::FACE_PERSISTENCY_PERSISTENT, false, false},
{CreateFaceExpectedResult::SUCCESS, 0, ""});
createFace(factory,
FaceUri("udp4://127.0.0.1:6363"),
{},
- ndn::nfd::FACE_PERSISTENCY_PERMANENT,
- false,
- false,
+ {ndn::nfd::FACE_PERSISTENCY_PERMANENT, false, false},
{CreateFaceExpectedResult::SUCCESS, 0, ""});
createFace(factory,
FaceUri("udp4://127.0.0.1:20072"),
{},
- ndn::nfd::FACE_PERSISTENCY_PERMANENT,
- false,
- false,
+ {ndn::nfd::FACE_PERSISTENCY_PERMANENT, false, false},
{CreateFaceExpectedResult::SUCCESS, 0, ""});
createFace(factory,
FaceUri("udp4://127.0.0.1:20073"),
{},
- ndn::nfd::FACE_PERSISTENCY_PERMANENT,
- false,
- true,
+ {ndn::nfd::FACE_PERSISTENCY_PERMANENT, false, true},
{CreateFaceExpectedResult::SUCCESS, 0, ""});
}
@@ -924,36 +914,28 @@
createFace(factory,
FaceUri("udp4://127.0.0.1:20072"),
FaceUri("udp4://127.0.0.1:20071"),
- ndn::nfd::FACE_PERSISTENCY_PERSISTENT,
- false,
- false,
+ {ndn::nfd::FACE_PERSISTENCY_PERSISTENT, false, false},
{CreateFaceExpectedResult::FAILURE, 406,
"Unicast UDP faces cannot be created with a LocalUri"});
createFace(factory,
FaceUri("udp4://127.0.0.1:20072"),
{},
- ndn::nfd::FACE_PERSISTENCY_ON_DEMAND,
- false,
- false,
+ {ndn::nfd::FACE_PERSISTENCY_ON_DEMAND, false, false},
{CreateFaceExpectedResult::FAILURE, 406,
"Outgoing UDP faces do not support on-demand persistency"});
createFace(factory,
FaceUri("udp4://233.252.0.1:23252"),
{},
- ndn::nfd::FACE_PERSISTENCY_PERSISTENT,
- false,
- false,
+ {ndn::nfd::FACE_PERSISTENCY_PERSISTENT, false, false},
{CreateFaceExpectedResult::FAILURE, 406,
"Cannot create multicast UDP faces"});
createFace(factory,
FaceUri("udp4://127.0.0.1:20072"),
{},
- ndn::nfd::FACE_PERSISTENCY_PERSISTENT,
- true,
- false,
+ {ndn::nfd::FACE_PERSISTENCY_PERSISTENT, true, false},
{CreateFaceExpectedResult::FAILURE, 406,
"Local fields can only be enabled on faces with local scope"});
}
diff --git a/tests/daemon/face/unix-stream-factory.t.cpp b/tests/daemon/face/unix-stream-factory.t.cpp
index 8d0e484..79eefa6 100644
--- a/tests/daemon/face/unix-stream-factory.t.cpp
+++ b/tests/daemon/face/unix-stream-factory.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2017, Regents of the University of California,
+ * Copyright (c) 2014-2018, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -125,25 +125,19 @@
createFace(factory,
FaceUri("unix:///var/run/nfd.sock"),
{},
- ndn::nfd::FACE_PERSISTENCY_PERMANENT,
- false,
- false,
+ {ndn::nfd::FACE_PERSISTENCY_ON_DEMAND, false, false},
{CreateFaceExpectedResult::FAILURE, 406, "Unsupported protocol"});
createFace(factory,
FaceUri("unix:///var/run/nfd.sock"),
{},
- ndn::nfd::FACE_PERSISTENCY_ON_DEMAND,
- false,
- false,
+ {ndn::nfd::FACE_PERSISTENCY_PERSISTENT, false, false},
{CreateFaceExpectedResult::FAILURE, 406, "Unsupported protocol"});
createFace(factory,
FaceUri("unix:///var/run/nfd.sock"),
{},
- ndn::nfd::FACE_PERSISTENCY_PERSISTENT,
- false,
- false,
+ {ndn::nfd::FACE_PERSISTENCY_PERMANENT, false, false},
{CreateFaceExpectedResult::FAILURE, 406, "Unsupported protocol"});
}
diff --git a/tests/daemon/face/websocket-factory.t.cpp b/tests/daemon/face/websocket-factory.t.cpp
index d813931..bb8a378 100644
--- a/tests/daemon/face/websocket-factory.t.cpp
+++ b/tests/daemon/face/websocket-factory.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2017, Regents of the University of California,
+ * Copyright (c) 2014-2018, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -196,25 +196,19 @@
createFace(factory,
FaceUri("ws://127.0.0.1:20070"),
{},
- ndn::nfd::FACE_PERSISTENCY_PERMANENT,
- false,
- false,
+ {ndn::nfd::FACE_PERSISTENCY_ON_DEMAND, false, false},
{CreateFaceExpectedResult::FAILURE, 406, "Unsupported protocol"});
createFace(factory,
FaceUri("ws://127.0.0.1:20070"),
{},
- ndn::nfd::FACE_PERSISTENCY_ON_DEMAND,
- false,
- false,
+ {ndn::nfd::FACE_PERSISTENCY_PERSISTENT, false, false},
{CreateFaceExpectedResult::FAILURE, 406, "Unsupported protocol"});
createFace(factory,
FaceUri("ws://127.0.0.1:20070"),
{},
- ndn::nfd::FACE_PERSISTENCY_PERSISTENT,
- false,
- false,
+ {ndn::nfd::FACE_PERSISTENCY_PERMANENT, false, false},
{CreateFaceExpectedResult::FAILURE, 406, "Unsupported protocol"});
}
diff --git a/tests/daemon/mgmt/face-manager.t.cpp b/tests/daemon/mgmt/face-manager.t.cpp
index 7e294d4..d1266dd 100644
--- a/tests/daemon/mgmt/face-manager.t.cpp
+++ b/tests/daemon/mgmt/face-manager.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2017, Regents of the University of California,
+ * Copyright (c) 2014-2018, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -268,7 +268,7 @@
}
void
- createFace(const CreateFaceParams& params,
+ createFace(const CreateFaceRequest& req,
const face::FaceCreatedCallback& onCreated,
const face::FaceCreationFailedCallback& onConnectFailed) final
{
diff --git a/tests/other/face-benchmark.cpp b/tests/other/face-benchmark.cpp
index 3f19441..2557d6f 100644
--- a/tests/other/face-benchmark.cpp
+++ b/tests/other/face-benchmark.cpp
@@ -128,17 +128,12 @@
auto addr = ndn::ip::addressFromString(uriR.getHost());
auto port = boost::lexical_cast<uint16_t>(uriR.getPort());
if (uriR.getScheme() == "tcp4") {
- m_tcpChannel.connect(tcp::Endpoint(addr, port),
- ndn::nfd::FACE_PERSISTENCY_PERSISTENT,
- false,
- false,
+ m_tcpChannel.connect(tcp::Endpoint(addr, port), {},
bind(&FaceBenchmark::onRightFaceCreated, this, faceL, _1),
bind(&FaceBenchmark::onFaceCreationFailed, _1, _2));
}
else if (uriR.getScheme() == "udp4") {
- m_udpChannel.connect(udp::Endpoint(addr, port),
- ndn::nfd::FACE_PERSISTENCY_PERSISTENT,
- false,
+ m_udpChannel.connect(udp::Endpoint(addr, port), {},
bind(&FaceBenchmark::onRightFaceCreated, this, faceL, _1),
bind(&FaceBenchmark::onFaceCreationFailed, _1, _2));
}