| * File: test-no-boost.cpp |
| * Created on June 10, 2013, 4:21 PM |
| #include "ndn-cpp/fields/name.h" |
| #include "ndn-cpp/fields/name-component.h" |
| #include "ndn-cpp/interest.h" |
| #include "ndn-cpp/wire/ccnb.h" |
| int main(int argc, char** argv) { |
| ptr_lib::shared_ptr<Interest> interest(new Interest()); |
| interest->setName(Name("/test")); |
| interest->setMinSuffixComponents(2); |
| interest->setMaxSuffixComponents(2); |
| interest->setInterestLifetime(boost::posix_time::seconds(10)); |
| interest->setScope(Interest::SCOPE_LOCAL_CCND); |
| interest->setAnswerOriginKind(Interest::AOK_STALE); |
| interest->setChildSelector(Interest::CHILD_RIGHT); |
| // i.setPublisherPublicKeyDigest(?); |
| wire::Ccnb::appendInterest(binary, *interest); |
| cout << binary.str().size(); |