face: When there are no more events to process, pausing transport instead of closing it
Change-Id: I12ad55c6ef3b6b3fce4a5b3c679eb0c6dc3cfa07
Refs: #1314
diff --git a/src/transport/tcp-transport.cpp b/src/transport/tcp-transport.cpp
index 24ec85c..b0935a4 100644
--- a/src/transport/tcp-transport.cpp
+++ b/src/transport/tcp-transport.cpp
@@ -21,13 +21,13 @@
{
}
-void
+void
TcpTransport::connect(boost::asio::io_service& ioService,
const ReceiveCallback& receiveCallback)
{
if (!static_cast<bool>(m_impl)) {
Transport::connect(ioService, receiveCallback);
-
+
m_impl = make_shared<Impl> (boost::ref(*this),
boost::ref(ioService));
}
@@ -36,7 +36,7 @@
m_impl->connect(query);
}
-void
+void
TcpTransport::send(const Block& wire)
{
m_impl->send(wire);
@@ -48,10 +48,22 @@
m_impl->send(header, payload);
}
-void
+void
TcpTransport::close()
{
m_impl->close();
}
+void
+TcpTransport::pause()
+{
+ m_impl->pause();
+}
+
+void
+TcpTransport::resume()
+{
+ m_impl->resume();
+}
+
} // namespace ndn