transport: Remove unused member elementListener_.
diff --git a/include/ndn-cpp/transport/tcp-transport.hpp b/include/ndn-cpp/transport/tcp-transport.hpp
index ce7e697..4be0144 100644
--- a/include/ndn-cpp/transport/tcp-transport.hpp
+++ b/include/ndn-cpp/transport/tcp-transport.hpp
@@ -93,7 +93,6 @@
private:
ptr_lib::shared_ptr<struct ndn_TcpTransport> transport_;
bool isConnected_;
- ElementListener *elementListener_;
// TODO: This belongs in the socket listener.
ptr_lib::shared_ptr<struct ndn_BinaryXmlElementReader> elementReader_;
};
diff --git a/include/ndn-cpp/transport/transport.hpp b/include/ndn-cpp/transport/transport.hpp
index 3be3dd3..5a23027 100644
--- a/include/ndn-cpp/transport/transport.hpp
+++ b/include/ndn-cpp/transport/transport.hpp
@@ -48,8 +48,8 @@
/**
* Process any data to receive. For each element received, call elementListener.onReceivedElement.
- * This is non-blocking and will silently time out after a brief period if there is no data to receive.
- * You should repeatedly call this from an event loop.
+ * This is non-blocking and will return immediately if there is no data to receive.
+ * You should normally not call this directly since it is called by Face.processEvents.
* @throw This may throw an exception for reading data or in the callback for processing the data. If you
* call this from an main event loop, you may want to catch and log/disregard all exceptions.
*/
diff --git a/include/ndn-cpp/transport/udp-transport.hpp b/include/ndn-cpp/transport/udp-transport.hpp
index 6d83345..ea38496 100644
--- a/include/ndn-cpp/transport/udp-transport.hpp
+++ b/include/ndn-cpp/transport/udp-transport.hpp
@@ -98,7 +98,6 @@
private:
ptr_lib::shared_ptr<struct ndn_UdpTransport> transport_;
bool isConnected_;
- ElementListener *elementListener_;
// TODO: This belongs in the socket listener.
ptr_lib::shared_ptr<struct ndn_BinaryXmlElementReader> elementReader_;
};
diff --git a/src/transport/tcp-transport.cpp b/src/transport/tcp-transport.cpp
index ea32c4d..6c5dc85 100644
--- a/src/transport/tcp-transport.cpp
+++ b/src/transport/tcp-transport.cpp
@@ -22,7 +22,7 @@
}
TcpTransport::TcpTransport()
- : elementListener_(0), isConnected_(false), transport_(new struct ndn_TcpTransport), elementReader_(new struct ndn_BinaryXmlElementReader)
+ : isConnected_(false), transport_(new struct ndn_TcpTransport), elementReader_(new struct ndn_BinaryXmlElementReader)
{
ndn_TcpTransport_initialize(transport_.get());
elementReader_->partialData.array = 0;
@@ -44,7 +44,6 @@
(elementReader_.get(), &elementListener, (uint8_t *)malloc(initialLength), initialLength, ndn_realloc);
isConnected_ = true;
- elementListener_ = &elementListener;
}
void
diff --git a/src/transport/udp-transport.cpp b/src/transport/udp-transport.cpp
index 2d4a902..c8def39 100644
--- a/src/transport/udp-transport.cpp
+++ b/src/transport/udp-transport.cpp
@@ -22,7 +22,7 @@
}
UdpTransport::UdpTransport()
- : elementListener_(0), isConnected_(false), transport_(new struct ndn_UdpTransport), elementReader_(new struct ndn_BinaryXmlElementReader)
+ : isConnected_(false), transport_(new struct ndn_UdpTransport), elementReader_(new struct ndn_BinaryXmlElementReader)
{
ndn_UdpTransport_initialize(transport_.get());
elementReader_->partialData.array = 0;
@@ -44,7 +44,6 @@
(elementReader_.get(), &elementListener, (uint8_t *)malloc(initialLength), initialLength, ndn_realloc);
isConnected_ = true;
- elementListener_ = &elementListener;
}
void