For now, in Transport, add virtual tempReceive
diff --git a/ndn-cpp/transport/transport.hpp b/ndn-cpp/transport/transport.hpp
index dedfffd..de2b7e5 100644
--- a/ndn-cpp/transport/transport.hpp
+++ b/ndn-cpp/transport/transport.hpp
@@ -27,6 +27,12 @@
}
/**
+ * Make one pass to receive any data waiting on the connection.
+ * @deprecated
+ */
+ virtual void tempReceive() = 0;
+
+ /**
* Close the connection. This base class implementation does nothing, but your derived class can override.
*/
virtual void close();
diff --git a/tests/test-get-async.cpp b/tests/test-get-async.cpp
index 8d33015..ab77a09 100644
--- a/tests/test-get-async.cpp
+++ b/tests/test-get-async.cpp
@@ -43,14 +43,13 @@
int main(int argc, char** argv)
{
try {
- shared_ptr<UdpTransport> transport(new UdpTransport());
shared_ptr<MyClosure> closure(new MyClosure());
- Face face("E.hub.ndn.ucla.edu", 9695, transport);
+ Face face("E.hub.ndn.ucla.edu", 9695, shared_ptr<UdpTransport>(new UdpTransport()));
face.expressInterest(Name("/ndn/ucla.edu/apps/ndn-js-test/hello.txt/level2/%FD%05%0B%16%7D%95%0E"), closure);
// Pump the receive process. This should really be done by a socket listener.
while (!closure->gotContent_)
- transport->tempReceive();
+ face.getTransport()->tempReceive();
} catch (std::exception &e) {
cout << "exception: " << e.what() << endl;
}