Added shutdown method
diff --git a/ndn-cpp/face.cpp b/ndn-cpp/face.cpp
index 4fa2325..d5c174b 100644
--- a/ndn-cpp/face.cpp
+++ b/ndn-cpp/face.cpp
@@ -25,6 +25,11 @@
transport_->send(*encoding);
}
+void Face::shutdown()
+{
+ transport_->close();
+}
+
void Face::onReceivedElement(unsigned char *element, unsigned int elementLength)
{
BinaryXmlDecoder decoder(element, elementLength);
diff --git a/ndn-cpp/face.hpp b/ndn-cpp/face.hpp
index ed30050..b00314b 100644
--- a/ndn-cpp/face.hpp
+++ b/ndn-cpp/face.hpp
@@ -48,6 +48,8 @@
expressInterest(name, closure, 0);
}
+ void shutdown();
+
const char *getHost() const { return host_.c_str(); }
unsigned short getPort() const { return port_; }