NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: 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 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
63 
64 private:
65  virtual void
66  doSend(Transport::Packet&& packet) final;
67 
68  virtual void
69  doClose() 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
MulticastUdpTransport(const protocol::endpoint &localEndpoint, const protocol::endpoint &multicastGroup, protocol::socket &&recvSocket, protocol::socket &&sendSocket)
Creates a UDP-based transport for multicast communication.
stores a packet along with the remote endpoint
Definition: transport.hpp:113
virtual void beforeChangePersistency(ndn::nfd::FacePersistency newPersistency) final
invoked before persistency is changed
Implements Transport for datagram-based protocols.
static EndpointId makeEndpointId(const typename protocol::endpoint &ep)
Copyright (c) 2011-2015 Regents of the University of California.
Definition: ndn-common.hpp:40
A Transport that communicates on a UDP multicast group.
uint64_t EndpointId
identifies an endpoint on the link
Definition: transport.hpp:109