26 #ifndef NFD_DAEMON_FACE_UDP_FACTORY_HPP 27 #define NFD_DAEMON_FACE_UDP_FACTORY_HPP 56 UdpFactory(
const std::string& defaultPort =
"6363");
82 shared_ptr<UdpChannel>
84 const time::seconds& timeout = time::seconds(600));
100 shared_ptr<UdpChannel>
102 const std::string& localPort,
103 const time::seconds& timeout = time::seconds(600));
134 shared_ptr<MulticastUdpFace>
137 const std::string& networkInterfaceName =
"");
139 shared_ptr<MulticastUdpFace>
141 const std::string& multicastIp,
142 const std::string& multicastPort,
143 const std::string& networkInterfaceName =
"");
152 virtual std::list<shared_ptr<const Channel>>
158 const MulticastFaceMap&
166 prohibitAllIpv4Endpoints(
const uint16_t port);
169 prohibitAllIpv6Endpoints(
const uint16_t port);
182 shared_ptr<UdpChannel>
193 shared_ptr<MulticastUdpFace>
197 typedef std::map<udp::Endpoint, shared_ptr<UdpChannel>> ChannelMap;
199 ChannelMap m_channels;
200 MulticastFaceMap m_multicastFaces;
202 std::string m_defaultPort;
203 std::set<udp::Endpoint> m_prohibitedEndpoints;
209 return m_multicastFaces;
214 #endif // NFD_DAEMON_FACE_UDP_FACTORY_HPP function< void(const std::string &reason)> FaceConnectFailedCallback
Prototype for the callback that is called when face is failed to get created.
virtual void createFace(const FaceUri &uri, ndn::nfd::FacePersistency persistency, const FaceCreatedCallback &onCreated, const FaceConnectFailedCallback &onConnectFailed) 1
Try to create Face using the supplied FaceUri.
represents the underlying protocol and address used by a Face
UdpFactory(const std::string &defaultPort="6363")
std::map< udp::Endpoint, shared_ptr< MulticastUdpFace > > MulticastFaceMap
#define DECL_OVERRIDE
expands to 'override' if compiler supports this feature, otherwise expands to nothing ...
virtual std::list< shared_ptr< const Channel > > getChannels() const
shared_ptr< UdpChannel > createChannel(const udp::Endpoint &localEndpoint, const time::seconds &timeout=time::seconds(600))
Create UDP-based channel using udp::Endpoint.
Error(const std::string &what)
Copyright (c) 2011-2015 Regents of the University of California.
shared_ptr< MulticastUdpFace > createMulticastFace(const udp::Endpoint &localEndpoint, const udp::Endpoint &multicastEndpoint, const std::string &networkInterfaceName="")
Create MulticastUdpFace using udp::Endpoint.
Base class for all exceptions thrown by channel factories.
boost::asio::ip::udp::endpoint Endpoint
#define PUBLIC_WITH_TESTS_ELSE_PRIVATE
function< void(const shared_ptr< Face > &newFace)> FaceCreatedCallback
Prototype for the callback called when face is created (as a response to incoming connection or after...
const MulticastFaceMap & getMulticastFaces() const
Get map of configured multicast faces.