NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
multicast-udp-transport.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26 #ifndef NFD_DAEMON_FACE_MULTICAST_UDP_TRANSPORT_HPP
27 #define NFD_DAEMON_FACE_MULTICAST_UDP_TRANSPORT_HPP
28 
29 #include "datagram-transport.hpp"
30 
31 namespace nfd {
32 namespace face {
33 
34 // Explicit specialization of makeEndpointId for the UDP multicast case.
35 // Note that this "shall be declared before the first use of the specialization
36 // that would cause an implicit instantiation to take place, in every translation
37 // unit in which such a use occurs".
38 template<>
41 
45 class MulticastUdpTransport DECL_CLASS_FINAL : public DatagramTransport<boost::asio::ip::udp, Multicast>
46 {
47 public:
55  MulticastUdpTransport(const protocol::endpoint& localEndpoint,
56  const protocol::endpoint& multicastGroup,
57  protocol::socket&& recvSocket,
58  protocol::socket&& sendSocket);
59 
60 protected:
61  virtual void
62  beforeChangePersistency(ndn::nfd::FacePersistency newPersistency) DECL_FINAL;
63 
64 private:
65  virtual void
66  doSend(Transport::Packet&& packet) DECL_FINAL;
67 
68  virtual void
69  doClose() DECL_FINAL;
70 
71 private:
72  protocol::endpoint m_multicastGroup;
73  protocol::socket m_sendSocket;
74 };
75 
76 } // namespace face
77 } // namespace nfd
78 
79 #endif // NFD_DAEMON_FACE_MULTICAST_UDP_TRANSPORT_HPP
#define DECL_CLASS_FINAL
expands to &#39;final&#39; if compiler supports &#39;final&#39; specifier on class, otherwise expands to nothing ...
Definition: common.hpp:70
#define DECL_FINAL
expands to &#39;final&#39; if compiler supports &#39;final&#39; specifier on method, otherwise expands to nothing ...
Definition: common.hpp:60
static EndpointId makeEndpointId(const typename protocol::endpoint &ep)
Copyright (c) 2011-2015 Regents of the University of California.
Definition: ndn-common.hpp:40
uint64_t EndpointId
identifies an endpoint on the link
Definition: transport.hpp:109