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&
152 bool wantLocalFieldsEnabled,
156 virtual std::vector<shared_ptr<const Channel>>
164 prohibitAllIpv4Endpoints(uint16_t port);
167 prohibitAllIpv6Endpoints(uint16_t port);
176 shared_ptr<UdpChannel>
189 std::map<udp::Endpoint, shared_ptr<UdpChannel>> m_channels;
190 MulticastFaceMap m_multicastFaces;
193 std::set<udp::Endpoint> m_prohibitedEndpoints;
199 return m_multicastFaces;
204 #endif // NFD_DAEMON_FACE_UDP_FACTORY_HPP #define PUBLIC_WITH_TESTS_ELSE_PRIVATE
const MulticastFaceMap & getMulticastFaces() const
Get map of configured multicast faces.
std::map< udp::Endpoint, shared_ptr< Face > > MulticastFaceMap
virtual std::vector< shared_ptr< const Channel > > getChannels() const override
Base class for all exceptions thrown by protocol factories.
represents the underlying protocol and address used by a Face
shared_ptr< Face > createMulticastFace(const udp::Endpoint &localEndpoint, const udp::Endpoint &multicastEndpoint, const std::string &networkInterfaceName="")
Create MulticastUdpFace using udp::Endpoint.
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.
Abstract base class for all protocol factories.
boost::asio::ip::udp::endpoint Endpoint
function< void(uint32_t status, const std::string &reason)> FaceCreationFailedCallback
Prototype for the callback that is invoked when the face fails to be created.
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...
virtual void createFace(const FaceUri &uri, ndn::nfd::FacePersistency persistency, bool wantLocalFieldsEnabled, const FaceCreatedCallback &onCreated, const FaceCreationFailedCallback &onFailure) override
Try to create Face using the supplied FaceUri.