26 #ifndef NFD_DAEMON_FACE_MULTICAST_UDP_TRANSPORT_HPP
27 #define NFD_DAEMON_FACE_MULTICAST_UDP_TRANSPORT_HPP
31 #include <boost/asio/ip/udp.hpp>
32 #include <ndn-cxx/net/network-interface.hpp>
44 class Error :
public std::runtime_error
47 using std::runtime_error::runtime_error;
58 protocol::socket&& recvSocket,
59 protocol::socket&& sendSocket,
60 ndn::nfd::LinkType linkType);
70 const
protocol::endpoint& multicastGroup,
71 const boost::asio::ip::address& localAddress = {},
72 const ndn::net::NetworkInterface* netif =
nullptr);
79 const protocol::endpoint& localEndpoint,
80 const ndn::net::NetworkInterface* netif =
nullptr,
81 bool enableLoopback =
false);
85 doSend(
const Block& packet)
final;
Implements Transport for datagram-based protocols.
boost::asio::ip::udp protocol
A Transport that communicates on a UDP multicast group.
MulticastUdpTransport(const protocol::endpoint &multicastGroup, protocol::socket &&recvSocket, protocol::socket &&sendSocket, ndn::nfd::LinkType linkType)
Creates a UDP-based transport for multicast communication.
static void openRxSocket(protocol::socket &sock, const protocol::endpoint &multicastGroup, const boost::asio::ip::address &localAddress={}, const ndn::net::NetworkInterface *netif=nullptr)
Opens and configures the receive-side socket.
ssize_t getSendQueueLength() final
Returns the current send queue length of the transport (in octets).
static void openTxSocket(protocol::socket &sock, const protocol::endpoint &localEndpoint, const ndn::net::NetworkInterface *netif=nullptr, bool enableLoopback=false)
Opens and configures the transmit-side socket.
#define NFD_LOG_MEMBER_DECL_SPECIALIZED(cls)