ndn::tools::autoconfig::NdnFchDiscovery Class Reference

Discovery NDN hub using NDN-FCH protocol. More...

#include <ndn-fch-discovery.hpp>

Inheritance diagram for ndn::tools::autoconfig::NdnFchDiscovery:
Collaboration diagram for ndn::tools::autoconfig::NdnFchDiscovery:

Public Types

typedef std::function< void(const std::string &)> NextStageCallback
 Callback to be called when the stage fails. More...
 

Public Member Functions

 NdnFchDiscovery (Face &face, KeyChain &keyChain, const std::string &url, const NextStageCallback &nextStageOnFailure)
 Create stage to discover NDN hub using NDN-FCH protocol. More...
 
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
 
ndn::nfd::Controller m_controller
 
NextStageCallback m_nextStageOnFailure
 

Detailed Description

Discovery NDN hub using NDN-FCH protocol.

See also
https://github.com/cawka/ndn-fch/blob/master/README.md

Definition at line 40 of file ndn-fch-discovery.hpp.

Member Typedef Documentation

typedef std::function<void(const std::string&)> ndn::tools::autoconfig::Base::NextStageCallback
inherited

Callback to be called when the stage fails.

Definition at line 64 of file base.hpp.

Constructor & Destructor Documentation

ndn::tools::autoconfig::NdnFchDiscovery::NdnFchDiscovery ( Face &  face,
KeyChain &  keyChain,
const std::string &  url,
const NextStageCallback nextStageOnFailure 
)

Create stage to discover NDN hub using NDN-FCH protocol.

See also
Base::Base

Definition at line 135 of file ndn-fch-discovery.cpp.

Member Function Documentation

void ndn::tools::autoconfig::Base::connectToHub ( const std::string &  uri)
protectedinherited

Attempt to connect to local hub using the uri FaceUri.

Exceptions
Base::Errorwhen failed to establish the tunnel

Definition at line 41 of file base.cpp.

void ndn::tools::autoconfig::NdnFchDiscovery::start ( )
overridevirtual

Start the stage.

Implements ndn::tools::autoconfig::Base.

Definition at line 144 of file ndn-fch-discovery.cpp.

Member Data Documentation

ndn::nfd::Controller ndn::tools::autoconfig::Base::m_controller
protectedinherited

Definition at line 113 of file base.hpp.

Face& ndn::tools::autoconfig::Base::m_face
protectedinherited

Definition at line 111 of file base.hpp.

KeyChain& ndn::tools::autoconfig::Base::m_keyChain
protectedinherited

Definition at line 112 of file base.hpp.

NextStageCallback ndn::tools::autoconfig::Base::m_nextStageOnFailure
protectedinherited

Definition at line 114 of file base.hpp.