NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
udp-face.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26 #ifndef NFD_DAEMON_FACE_UDP_FACE_HPP
27 #define NFD_DAEMON_FACE_UDP_FACE_HPP
28 
29 #include "datagram-face.hpp"
30 #include "core/scheduler.hpp"
31 
32 namespace nfd {
33 
38 class UdpFace : public DatagramFace<boost::asio::ip::udp>
39 {
40 public:
41  UdpFace(const FaceUri& remoteUri, const FaceUri& localUri,
42  protocol::socket socket, ndn::nfd::FacePersistency persistency,
43  const time::seconds& idleTimeout);
44 
47 
48 private:
49  void
50  closeIfIdle();
51 
52 private:
53  const time::seconds m_idleTimeout;
54  time::steady_clock::TimePoint m_lastIdleCheck;
55  scheduler::ScopedEventId m_closeIfIdleEvent;
56 
57  // friend because it needs to invoke protected Face::setOnDemand
58  friend class UdpChannel;
59 };
60 
61 } // namespace nfd
62 
63 #endif // NFD_DAEMON_FACE_UDP_FACE_HPP
time_point TimePoint
Definition: time.hpp:108
represents the underlying protocol and address used by a Face
Definition: face-uri.hpp:44
Class implementing UDP-based channel to create faces.
Definition: udp-channel.hpp:42
ndn::nfd::FaceStatus getFaceStatus() const 1
Definition: udp-face.cpp:75
Implementation of Face abstraction that uses unicast UDP as underlying transport mechanism.
Definition: udp-face.hpp:38
#define DECL_OVERRIDE
expands to &#39;override&#39; if compiler supports this feature, otherwise expands to nothing ...
Definition: common.hpp:49
Copyright (c) 2011-2015 Regents of the University of California.
Definition: ndn-common.hpp:38
cancels an event automatically upon destruction
Definition: scheduler.hpp:53
represents Face status
UdpFace(const FaceUri &remoteUri, const FaceUri &localUri, protocol::socket socket, ndn::nfd::FacePersistency persistency, const time::seconds &idleTimeout)
Definition: udp-face.cpp:40