Multicast discovery stage. More...
#include <multicast-discovery.hpp>
Public Types | |
typedef std::function< void(const std::string &)> | NextStageCallback |
Callback to be called when the stage fails. More... | |
Public Member Functions | |
MulticastDiscovery (Face &face, KeyChain &keyChain, const NextStageCallback &nextStageOnFailure) | |
Create multicast discovery stage. More... | |
virtual void | start () override |
Start the stage. More... | |
Protected Member Functions | |
void | connectToHub (const std::string &uri) |
Attempt to connect to local hub using the uri FaceUri. More... | |
Protected Attributes | |
Face & | m_face |
KeyChain & | m_keyChain |
nfd::Controller | m_controller |
NextStageCallback | m_nextStageOnFailure |
Multicast discovery stage.
Request
The end host sends an Interest over a multicast face.
Interest Name is /localhop/ndn-autoconf/hub.
Response
A producer app on the HUB answer this Interest with a Data packet that contains a TLV-encoded Uri block. The value of this block is the URI for the HUB, preferably a UDP tunnel.
Definition at line 52 of file multicast-discovery.hpp.
|
inherited |
ndn::tools::autoconfig::MulticastDiscovery::MulticastDiscovery | ( | Face & | face, |
KeyChain & | keyChain, | ||
const NextStageCallback & | nextStageOnFailure | ||
) |
Create multicast discovery stage.
Definition at line 36 of file multicast-discovery.cpp.
|
protectedinherited |
Attempt to connect to local hub using the uri
FaceUri.
Base::Error | when failed to establish the tunnel |
|
overridevirtual |
Start the stage.
Implements ndn::tools::autoconfig::Base.
Definition at line 45 of file multicast-discovery.cpp.
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |