| /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */ |
| * Copyright (c) 2013, Regents of the University of California |
| * BSD license, See the LICENSE file for more information |
| * Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu> |
| ndn::Name InterestBaseName; |
| // create a global handler |
| void OnInterest (ndn::InterestPtr interest) |
| cerr << interest->getName () << endl; |
| os << "C++ LINE #" << (COUNTER++) << endl; |
| handler.publishData (interest->getName (), os.str (), 5); |
| main (int argc, char **argv) |
| InterestBaseName = ndn::Name ("ccnx:/my-local-prefix/simple-fetch/file"); |
| handler.setInterestFilter (InterestBaseName, OnInterest); |