Change namespace of DummyClientFace, Signal, Segmenter
refs #3940 Change-Id: I67ca0ecb8c916aab411a2f90454e0d25925978cd
This commit is contained in:
1 parent
dd808b0bae
commit
869d73e924
15 files changed
+39
-39
No files matched your search
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2016-2022, Regents of the University of California,
|
||||
* Copyright (c) 2016-2023, Regents of the University of California,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University.
|
||||
*
|
||||
@@ -59,7 +59,7 @@ BOOST_AUTO_TEST_CASE(InOrderData)
|
||||
"consequat massa Donec pede justo,"
|
||||
};
|
||||
|
||||
util::DummyClientFace face;
|
||||
DummyClientFace face;
|
||||
output_test_stream output("");
|
||||
Consumer cons(security::getAcceptAllValidator(), output);
|
||||
|
||||
@@ -94,7 +94,7 @@ BOOST_AUTO_TEST_CASE(OutOfOrderData)
|
||||
"consequat massa Donec pede justo,"
|
||||
};
|
||||
|
||||
util::DummyClientFace face;
|
||||
DummyClientFace face;
|
||||
output_test_stream output("");
|
||||
Consumer cons(security::getAcceptAllValidator(), output);
|
||||
|
||||
@@ -148,7 +148,7 @@ public:
|
||||
|
||||
BOOST_FIXTURE_TEST_CASE(RunBasic, IoFixture)
|
||||
{
|
||||
util::DummyClientFace face(m_io);
|
||||
DummyClientFace face(m_io);
|
||||
Options options;
|
||||
Consumer consumer(security::getAcceptAllValidator());
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2016-2022, Regents of the University of California,
|
||||
* Copyright (c) 2016-2023, Regents of the University of California,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University.
|
||||
*
|
||||
@@ -60,7 +60,7 @@ public:
|
||||
protected:
|
||||
const Name name = "/ndn/chunks/test";
|
||||
const uint64_t version = 1449227841747;
|
||||
util::DummyClientFace face{m_io};
|
||||
DummyClientFace face{m_io};
|
||||
Options opt;
|
||||
unique_ptr<DiscoverVersion> discover;
|
||||
std::optional<Name> discoveredName;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2016-2022, Regents of the University of California,
|
||||
* Copyright (c) 2016-2023, Regents of the University of California,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University.
|
||||
*
|
||||
@@ -77,7 +77,7 @@ protected:
|
||||
}
|
||||
|
||||
protected:
|
||||
util::DummyClientFace face{m_io};
|
||||
DummyClientFace face{m_io};
|
||||
Name name{"/ndn/chunks/test"};
|
||||
uint64_t nDataSegments = 0;
|
||||
bool hasFailed = false;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2016-2022, Regents of the University of California,
|
||||
* Copyright (c) 2016-2023, Regents of the University of California,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University.
|
||||
*
|
||||
@@ -51,7 +51,7 @@ protected:
|
||||
}
|
||||
|
||||
protected:
|
||||
util::DummyClientFace face{m_io, {true, true}};
|
||||
DummyClientFace face{m_io, {true, true}};
|
||||
Name prefix = "/ndn/chunks/test";
|
||||
Producer::Options options;
|
||||
uint64_t version = 1449227841747;
|
||||
|
||||
@@ -68,7 +68,7 @@ protected:
|
||||
}
|
||||
|
||||
protected:
|
||||
ndn::util::DummyClientFace face{m_io};
|
||||
DummyClientFace face{m_io};
|
||||
output_test_stream output;
|
||||
unique_ptr<NdnPeek> peek;
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2014-2022, Regents of the University of California,
|
||||
* Copyright (c) 2014-2023, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -59,7 +59,7 @@ protected:
|
||||
}
|
||||
|
||||
protected:
|
||||
ndn::util::DummyClientFace face{m_io, m_keyChain, {true, WANT_PREFIX_REG_REPLY}};
|
||||
DummyClientFace face{m_io, m_keyChain, {true, WANT_PREFIX_REG_REPLY}};
|
||||
std::stringstream payload{"Hello, world!\n"};
|
||||
unique_ptr<NdnPoke> poke;
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2014-2022, Arizona Board of Regents.
|
||||
* Copyright (c) 2014-2023, Arizona Board of Regents.
|
||||
*
|
||||
* This file is part of ndn-tools (Named Data Networking Essential Tools).
|
||||
* See AUTHORS.md for complete list of ndn-tools authors and contributors.
|
||||
@@ -35,7 +35,7 @@ using client::Ping;
|
||||
|
||||
BOOST_FIXTURE_TEST_CASE(Basic, IoFixture)
|
||||
{
|
||||
util::DummyClientFace face(m_io, {true, true});
|
||||
DummyClientFace face(m_io, {true, true});
|
||||
Options pingOptions;
|
||||
pingOptions.prefix = "/test-prefix";
|
||||
pingOptions.shouldAllowStaleData = false;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2014-2022, Arizona Board of Regents.
|
||||
* Copyright (c) 2014-2023, Arizona Board of Regents.
|
||||
*
|
||||
* This file is part of ndn-tools (Named Data Networking Essential Tools).
|
||||
* See AUTHORS.md for complete list of ndn-tools authors and contributors.
|
||||
@@ -44,7 +44,7 @@ private:
|
||||
}
|
||||
|
||||
protected:
|
||||
util::DummyClientFace face;
|
||||
DummyClientFace face;
|
||||
Options pingOptions{makeOptions()};
|
||||
Ping pingProgram{face, pingOptions};
|
||||
StatisticsCollector sc{pingProgram, pingOptions};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2015-2022, Arizona Board of Regents.
|
||||
* Copyright (c) 2015-2023, Arizona Board of Regents.
|
||||
*
|
||||
* This file is part of ndn-tools (Named Data Networking Essential Tools).
|
||||
* See AUTHORS.md for complete list of ndn-tools authors and contributors.
|
||||
@@ -51,7 +51,7 @@ protected:
|
||||
|
||||
template<typename Packet>
|
||||
void
|
||||
receive(util::DummyClientFace& face, const Packet& pkt)
|
||||
receive(DummyClientFace& face, const Packet& pkt)
|
||||
{
|
||||
m_io.post([=, &face] {
|
||||
if (!wantLoss) {
|
||||
@@ -69,8 +69,8 @@ protected:
|
||||
}
|
||||
|
||||
protected:
|
||||
util::DummyClientFace serverFace{m_io, m_keyChain, {false, true}};
|
||||
util::DummyClientFace clientFace{m_io, m_keyChain, {false, true}};
|
||||
DummyClientFace serverFace{m_io, m_keyChain, {false, true}};
|
||||
DummyClientFace clientFace{m_io, m_keyChain, {false, true}};
|
||||
std::unique_ptr<server::PingServer> server;
|
||||
std::unique_ptr<client::Ping> client;
|
||||
bool wantLoss = false;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2014-2022, Arizona Board of Regents.
|
||||
* Copyright (c) 2014-2023, Arizona Board of Regents.
|
||||
*
|
||||
* This file is part of ndn-tools (Named Data Networking Essential Tools).
|
||||
* See AUTHORS.md for complete list of ndn-tools authors and contributors.
|
||||
@@ -59,7 +59,7 @@ private:
|
||||
}
|
||||
|
||||
protected:
|
||||
util::DummyClientFace face{m_io, m_keyChain, {false, true}};
|
||||
DummyClientFace face{m_io, m_keyChain, {false, true}};
|
||||
Options pingOptions{makeOptions()};
|
||||
PingServer pingServer{face, m_keyChain, pingOptions};
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2016-2022, Regents of the University of California,
|
||||
* Copyright (c) 2016-2023, Regents of the University of California,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University.
|
||||
*
|
||||
@@ -51,12 +51,12 @@ public:
|
||||
/**
|
||||
* @brief Signal emitted when the versioned name of Data is found.
|
||||
*/
|
||||
util::Signal<DiscoverVersion, Name> onDiscoverySuccess;
|
||||
signal::Signal<DiscoverVersion, Name> onDiscoverySuccess;
|
||||
|
||||
/**
|
||||
* @brief Signal emitted when a failure occurs.
|
||||
*/
|
||||
util::Signal<DiscoverVersion, std::string> onDiscoveryFailure;
|
||||
signal::Signal<DiscoverVersion, std::string> onDiscoveryFailure;
|
||||
|
||||
void
|
||||
run();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2016-2022, Regents of the University of California,
|
||||
* Copyright (c) 2016-2023, Regents of the University of California,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University.
|
||||
*
|
||||
@@ -94,7 +94,7 @@ public:
|
||||
* The callback function should be: `void(nanoseconds age, double cwnd)`, where `age` is the
|
||||
* time since the pipeline started and `cwnd` is the new congestion window size (in segments).
|
||||
*/
|
||||
util::Signal<PipelineInterestsAdaptive, time::nanoseconds, double> afterCwndChange;
|
||||
signal::Signal<PipelineInterestsAdaptive, time::nanoseconds, double> afterCwndChange;
|
||||
|
||||
struct RttSample
|
||||
{
|
||||
@@ -108,7 +108,7 @@ public:
|
||||
/**
|
||||
* @brief Signals when a new RTT sample has been taken.
|
||||
*/
|
||||
util::Signal<PipelineInterestsAdaptive, RttSample> afterRttMeasurement;
|
||||
signal::Signal<PipelineInterestsAdaptive, RttSample> afterRttMeasurement;
|
||||
|
||||
protected:
|
||||
DECLARE_SIGNAL_EMIT(afterCwndChange)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2016-2022, Regents of the University of California,
|
||||
* Copyright (c) 2016-2023, Regents of the University of California,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University.
|
||||
*
|
||||
@@ -53,7 +53,7 @@ Producer::Producer(const Name& prefix, Face& face, KeyChain& keyChain, std::istr
|
||||
if (!m_options.isQuiet) {
|
||||
std::cerr << "Loading input ...\n";
|
||||
}
|
||||
util::Segmenter segmenter(m_keyChain, m_options.signingInfo);
|
||||
Segmenter segmenter(m_keyChain, m_options.signingInfo);
|
||||
m_store = segmenter.segment(is, m_versionedPrefix, m_options.maxSegmentSize, m_options.freshnessPeriod);
|
||||
|
||||
// register m_prefix without Interest handler
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2015-2022, Arizona Board of Regents.
|
||||
* Copyright (c) 2015-2023, Arizona Board of Regents.
|
||||
*
|
||||
* This file is part of ndn-tools (Named Data Networking Essential Tools).
|
||||
* See AUTHORS.md for complete list of ndn-tools authors and contributors.
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
* @param seq ping sequence number
|
||||
* @param rtt round trip time
|
||||
*/
|
||||
util::Signal<Ping, uint64_t, Rtt> afterData;
|
||||
signal::Signal<Ping, uint64_t, Rtt> afterData;
|
||||
|
||||
/**
|
||||
* @brief Signals on the return of a Nack
|
||||
@@ -71,19 +71,19 @@ public:
|
||||
* @param rtt round trip time
|
||||
* @param header the received Network NACK header
|
||||
*/
|
||||
util::Signal<Ping, uint64_t, Rtt, lp::NackHeader> afterNack;
|
||||
signal::Signal<Ping, uint64_t, Rtt, lp::NackHeader> afterNack;
|
||||
|
||||
/**
|
||||
* @brief Signals on timeout of a packet
|
||||
*
|
||||
* @param seq ping sequence number
|
||||
*/
|
||||
util::Signal<Ping, uint64_t> afterTimeout;
|
||||
signal::Signal<Ping, uint64_t> afterTimeout;
|
||||
|
||||
/**
|
||||
* @brief Signals when finished pinging
|
||||
*/
|
||||
util::Signal<Ping> afterFinish;
|
||||
signal::Signal<Ping> afterFinish;
|
||||
|
||||
/**
|
||||
* @brief Start sending ping interests
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2015-2022, Arizona Board of Regents.
|
||||
* Copyright (c) 2015-2023, Arizona Board of Regents.
|
||||
*
|
||||
* This file is part of ndn-tools (Named Data Networking Essential Tools).
|
||||
* See AUTHORS.md for complete list of ndn-tools authors and contributors.
|
||||
@@ -55,12 +55,12 @@ public:
|
||||
*
|
||||
* @param name incoming interest name
|
||||
*/
|
||||
util::Signal<PingServer, Name> afterReceive;
|
||||
signal::Signal<PingServer, Name> afterReceive;
|
||||
|
||||
/**
|
||||
* @brief Signals when finished pinging
|
||||
*/
|
||||
util::Signal<PingServer> afterFinish;
|
||||
signal::Signal<PingServer> afterFinish;
|
||||
|
||||
/** @brief starts ping server
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user