示例#1
0
Nfdc::Nfdc(ndn::Face& face)
  : m_flags(ROUTE_FLAG_CHILD_INHERIT)
  , m_cost(DEFAULT_COST)
  , m_origin(ROUTE_ORIGIN_STATIC)
  , m_expires(DEFAULT_EXPIRATION_PERIOD)
  , m_face(face)
  , m_controller(face, m_keyChain)
  , m_ioService(face.getIoService())
{
}
示例#2
0
文件: fib.hpp 项目: Antrek/NDNProject
 Fib(ndn::Face& face, ndn::Scheduler& scheduler, AdjacencyList& adjacencyList, ConfParameter& conf,
     ndn::KeyChain& keyChain)
   : m_scheduler(scheduler)
   , m_table()
   , m_refreshTime(0)
   , m_controller(face, keyChain)
   , m_faceController(face.getIoService(), m_controller)
   , m_faceMap()
   , m_adjacencyList(adjacencyList)
   , m_confParameter(conf)
 {
 }
示例#3
0
void
Publisher::generateFromFile()
{
  if (insertStream.eof()) {
    m_face.getIoService().stop();
    return;
  }

  std::string name;
  getline(insertStream, name);
  auto data = createData(ndn::Name(name));
  m_face.put(*data);

  m_scheduler.schedule(timeInterval, [this] { generateFromFile(); });
}