36 protocol::socket recvSocket, protocol::socket sendSocket)
38 , m_multicastGroup(multicastGroup)
39 , m_sendSocket(
std::move(sendSocket))
43 const MulticastUdpFace::protocol::endpoint&
46 return m_multicastGroup;
68 MulticastUdpFace::sendBlock(
const Block& block)
70 m_sendSocket.async_send_to(boost::asio::buffer(block.
wire(), block.
size()), m_multicastGroup,
72 boost::asio::placeholders::error,
73 boost::asio::placeholders::bytes_transferred,
#define NFD_LOG_FACE_TRACE(msg)
Log a message at TRACE level.
signal::Signal< Face, Interest > onSendInterest
fires when an Interest is sent out
represents the underlying protocol and address used by a Face
const uint8_t * wire() const
MulticastUdpFace(const protocol::endpoint &multicastGroup, const FaceUri &localUri, protocol::socket recvSocket, protocol::socket sendSocket)
Creates a UDP-based face for multicast communication.
Class representing a wire element of NDN-TLV packet format.
represents an Interest packet
void sendData(const Data &data) 1
send a Data
signal::Signal< Face, Data > onSendData
fires when a Data is sent out
#define emitSignal(...)
(implementation detail)
Copyright (c) 2011-2015 Regents of the University of California.
boost::asio::ip::udp protocol
void sendInterest(const Interest &interest) 1
send an Interest
void handleSend(const boost::system::error_code &error, size_t nBytesSent, const Block &payload)
size_t wireEncode(EncodingImpl< TAG > &encoder) const
Fast encoding or block size estimation.
size_t wireEncode(EncodingImpl< TAG > &encoder, bool wantUnsignedPortionOnly=false) const
Fast encoding or block size estimation.
const protocol::endpoint & getMulticastGroup() const