Added initial expressInterest
diff --git a/ndn-cpp/NDN.cpp b/ndn-cpp/NDN.cpp
index cafa4c6..4f7be39 100644
--- a/ndn-cpp/NDN.cpp
+++ b/ndn-cpp/NDN.cpp
@@ -12,6 +12,16 @@
namespace ndn {
+void NDN::expressInterest(const Name &name, const ptr_lib::shared_ptr<Closure> &closure, const Interest *interestTemplate)
+{
+ Interest interest(name);
+ vector<unsigned char> encoding;
+ interest.encode(encoding);
+
+ transport_->connect((char *)"E.hub.ndn.ucla.edu", 9695);
+ transport_->send(&encoding[0], encoding.size());
+}
+
void NDN::onReceivedElement(unsigned char *element, unsigned int elementLength)
{
BinaryXMLDecoder decoder(element, elementLength);
@@ -22,7 +32,7 @@
ptr_lib::shared_ptr<Interest> dummyInterest;
UpcallInfo upcallInfo(this, dummyInterest, 0, contentObject);
- closure_->upcall(UPCALL_CONTENT, upcallInfo);
+ tempClosure_->upcall(UPCALL_CONTENT, upcallInfo);
}
}