26 #ifndef NFD_DAEMON_FACE_UDP_FACTORY_HPP 27 #define NFD_DAEMON_FACE_UDP_FACTORY_HPP 78 shared_ptr<UdpChannel>
80 const time::seconds& timeout = time::seconds(600));
96 shared_ptr<UdpChannel>
97 createChannel(
const std::string& localIp,
const std::string& localPort,
98 const time::seconds& timeout = time::seconds(600));
134 const std::string& networkInterfaceName =
"");
138 const std::string& multicastIp,
139 const std::string& multicastPort,
140 const std::string& networkInterfaceName =
"");
145 const MulticastFaceMap&
155 virtual std::vector<shared_ptr<const Channel>>
160 prohibitEndpoint(const udp::
Endpoint& endpoint);
163 prohibitAllIpv4Endpoints(uint16_t port);
166 prohibitAllIpv6Endpoints(uint16_t port);
176 findChannel(const udp::
Endpoint& localEndpoint) const;
185 findMulticastFace(const udp::
Endpoint& localEndpoint) const;
189 MulticastFaceMap m_multicastFaces;
192 std::set<udp::Endpoint> m_prohibitedEndpoints;
198 return m_multicastFaces;
203 #endif // NFD_DAEMON_FACE_UDP_FACTORY_HPP const MulticastFaceMap & getMulticastFaces() const
Get map of configured multicast faces.
std::map< udp::Endpoint, shared_ptr< Face > > MulticastFaceMap
function< void(const std::string &reason)> FaceCreationFailedCallback
Prototype for the callback that is invoked when the face fails to be created.
Base class for all exceptions thrown by protocol factories.
represents the underlying protocol and address used by a Face
Class implementing UDP-based channel to create faces.
shared_ptr< Face > createMulticastFace(const udp::Endpoint &localEndpoint, const udp::Endpoint &multicastEndpoint, const std::string &networkInterfaceName="")
Create MulticastUdpFace using udp::Endpoint.
#define DECL_OVERRIDE
expands to 'override' if compiler supports 'override' specifier, otherwise expands to nothing ...
shared_ptr< UdpChannel > createChannel(const udp::Endpoint &localEndpoint, const time::seconds &timeout=time::seconds(600))
Create UDP-based channel using udp::Endpoint.
virtual std::vector< shared_ptr< const Channel > > getChannels() const 1
Error(const std::string &what)
Copyright (c) 2011-2015 Regents of the University of California.
virtual void createFace(const FaceUri &uri, ndn::nfd::FacePersistency persistency, const FaceCreatedCallback &onCreated, const FaceCreationFailedCallback &onConnectFailed) 1
Try to create Face using the supplied FaceUri.
Abstract base class for all protocol factories.
boost::asio::ip::tcp::endpoint Endpoint
boost::asio::ip::udp::endpoint Endpoint
#define PUBLIC_WITH_TESTS_ELSE_PRIVATE
function< void(const shared_ptr< Face > &newFace)> FaceCreatedCallback
Prototype for the callback that is invoked when the face is created (as a response to incoming connec...