face: rename hasBeenUsedRecently to hasRecentlyReceived

The word "used" is misleading, because the flag is set only when
packets are received, not for any other use of the transport.

Change-Id: I8a940d7887955c47cef085149629591b6e80c2a1
diff --git a/daemon/face/datagram-transport.hpp b/daemon/face/datagram-transport.hpp
index 982e1f4..67ad0a7 100644
--- a/daemon/face/datagram-transport.hpp
+++ b/daemon/face/datagram-transport.hpp
@@ -79,10 +79,10 @@
   processErrorCode(const boost::system::error_code& error);
 
   bool
-  hasBeenUsedRecently() const;
+  hasRecentlyReceived() const;
 
   void
-  resetRecentUsage();
+  resetRecentlyReceived();
 
   static EndpointId
   makeEndpointId(const typename protocol::endpoint& ep);
@@ -95,14 +95,14 @@
 
 private:
   std::array<uint8_t, ndn::MAX_NDN_PACKET_SIZE> m_receiveBuffer;
-  bool m_hasBeenUsedRecently;
+  bool m_hasRecentlyReceived;
 };
 
 
 template<class T, class U>
 DatagramTransport<T, U>::DatagramTransport(typename DatagramTransport::protocol::socket&& socket)
   : m_socket(std::move(socket))
-  , m_hasBeenUsedRecently(false)
+  , m_hasRecentlyReceived(false)
 {
   m_socket.async_receive_from(boost::asio::buffer(m_receiveBuffer), m_sender,
                               bind(&DatagramTransport<T, U>::handleReceive, this,
@@ -167,7 +167,7 @@
     // This packet won't extend the face lifetime
     return;
   }
-  m_hasBeenUsedRecently = true;
+  m_hasRecentlyReceived = true;
 
   Transport::Packet tp(std::move(element));
   tp.remoteEndpoint = makeEndpointId(m_sender);
@@ -226,16 +226,16 @@
 
 template<class T, class U>
 bool
-DatagramTransport<T, U>::hasBeenUsedRecently() const
+DatagramTransport<T, U>::hasRecentlyReceived() const
 {
-  return m_hasBeenUsedRecently;
+  return m_hasRecentlyReceived;
 }
 
 template<class T, class U>
 void
-DatagramTransport<T, U>::resetRecentUsage()
+DatagramTransport<T, U>::resetRecentlyReceived()
 {
-  m_hasBeenUsedRecently = false;
+  m_hasRecentlyReceived = false;
 }
 
 template<class T, class U>
diff --git a/daemon/face/ethernet-transport.cpp b/daemon/face/ethernet-transport.cpp
index a4c4006..026b540 100644
--- a/daemon/face/ethernet-transport.cpp
+++ b/daemon/face/ethernet-transport.cpp
@@ -47,7 +47,7 @@
   , m_srcAddress(localEndpoint.etherAddress)
   , m_destAddress(remoteEndpoint)
   , m_interfaceName(localEndpoint.name)
-  , m_hasBeenUsedRecently(false)
+  , m_hasRecentlyReceived(false)
 #ifdef _DEBUG
   , m_nDropped(0)
 #endif
@@ -194,7 +194,7 @@
     // This packet won't extend the face lifetime
     return;
   }
-  m_hasBeenUsedRecently = true;
+  m_hasRecentlyReceived = true;
 
   Transport::Packet tp(std::move(element));
   static_assert(sizeof(tp.remoteEndpoint) >= ethernet::ADDR_LEN,
diff --git a/daemon/face/ethernet-transport.hpp b/daemon/face/ethernet-transport.hpp
index 6dcad18..69f4061 100644
--- a/daemon/face/ethernet-transport.hpp
+++ b/daemon/face/ethernet-transport.hpp
@@ -67,15 +67,15 @@
   doClose() final;
 
   bool
-  hasBeenUsedRecently() const
+  hasRecentlyReceived() const
   {
-    return m_hasBeenUsedRecently;
+    return m_hasRecentlyReceived;
   }
 
   void
-  resetRecentUsage()
+  resetRecentlyReceived()
   {
-    m_hasBeenUsedRecently = false;
+    m_hasRecentlyReceived = false;
   }
 
 private:
@@ -111,7 +111,7 @@
   std::string m_interfaceName;
 
 private:
-  bool m_hasBeenUsedRecently;
+  bool m_hasRecentlyReceived;
 #ifdef _DEBUG
   /// number of frames dropped by the kernel, as reported by libpcap
   size_t m_nDropped;
diff --git a/daemon/face/unicast-ethernet-transport.cpp b/daemon/face/unicast-ethernet-transport.cpp
index 05bab28..2ec15f0 100644
--- a/daemon/face/unicast-ethernet-transport.cpp
+++ b/daemon/face/unicast-ethernet-transport.cpp
@@ -88,12 +88,12 @@
 UnicastEthernetTransport::scheduleClosureWhenIdle()
 {
   m_closeIfIdleEvent = scheduler::schedule(m_idleTimeout, [this] {
-    if (!hasBeenUsedRecently()) {
+    if (!hasRecentlyReceived()) {
       NFD_LOG_FACE_INFO("Closing due to inactivity");
       this->close();
     }
     else {
-      resetRecentUsage();
+      resetRecentlyReceived();
       scheduleClosureWhenIdle();
     }
   });
diff --git a/daemon/face/unicast-udp-transport.cpp b/daemon/face/unicast-udp-transport.cpp
index 2860559..4f8a8f7 100644
--- a/daemon/face/unicast-udp-transport.cpp
+++ b/daemon/face/unicast-udp-transport.cpp
@@ -103,12 +103,12 @@
 UnicastUdpTransport::scheduleClosureWhenIdle()
 {
   m_closeIfIdleEvent = scheduler::schedule(m_idleTimeout, [this] {
-    if (!hasBeenUsedRecently()) {
+    if (!hasRecentlyReceived()) {
       NFD_LOG_FACE_INFO("Closing due to inactivity");
       this->close();
     }
     else {
-      resetRecentUsage();
+      resetRecentlyReceived();
       scheduleClosureWhenIdle();
     }
   });