nlsr::SegmentPublisher< FaceBase > Class Template Referenceabstract

provides a publisher of Status Dataset or other segmented octet stream More...

#include <segment-publisher.hpp>

Inheritance diagram for nlsr::SegmentPublisher< FaceBase >:
[legend]
Collaboration diagram for nlsr::SegmentPublisher< FaceBase >:
[legend]

Public Member Functions

 SegmentPublisher (FaceBase &face, ndn::KeyChain &keyChain, const ndn::security::SigningInfo &signingInfo, const ndn::time::milliseconds &freshnessPeriod=getDefaultFreshness())
 
virtual ~SegmentPublisher ()
 
void publish (const ndn::Name &prefix)
 Publish data under the provided prefix. More...
 

Static Public Member Functions

static size_t getMaxSegmentSize ()
 Define the max segment size as half the max NDN packet size. More...
 
static constexpr ndn::time::milliseconds getDefaultFreshness ()
 

Protected Member Functions

virtual size_t generate (ndn::EncodingBuffer &outBuffer)=0
 In a derived class, write the octets into outBuffer. More...
 

Detailed Description

template<class FaceBase>
class nlsr::SegmentPublisher< FaceBase >

provides a publisher of Status Dataset or other segmented octet stream

See also
https://redmine.named-data.net/projects/nfd/wiki/StatusDataset

Definition at line 38 of file segment-publisher.hpp.

Constructor & Destructor Documentation

template<class FaceBase>
nlsr::SegmentPublisher< FaceBase >::SegmentPublisher ( FaceBase &  face,
ndn::KeyChain &  keyChain,
const ndn::security::SigningInfo &  signingInfo,
const ndn::time::milliseconds &  freshnessPeriod = getDefaultFreshness() 
)
inline

Definition at line 41 of file segment-publisher.hpp.

template<class FaceBase>
virtual nlsr::SegmentPublisher< FaceBase >::~SegmentPublisher ( )
inlinevirtual

Definition at line 53 of file segment-publisher.hpp.

Member Function Documentation

template<class FaceBase>
virtual size_t nlsr::SegmentPublisher< FaceBase >::generate ( ndn::EncodingBuffer &  outBuffer)
protectedpure virtual

In a derived class, write the octets into outBuffer.

Implemented in nlsr::LsaContentPublisher.

Here is the caller graph for this function:

template<class FaceBase>
static constexpr ndn::time::milliseconds nlsr::SegmentPublisher< FaceBase >::getDefaultFreshness ( )
inlinestatic

Definition at line 67 of file segment-publisher.hpp.

template<class FaceBase>
static size_t nlsr::SegmentPublisher< FaceBase >::getMaxSegmentSize ( )
inlinestatic

Define the max segment size as half the max NDN packet size.

Definition at line 60 of file segment-publisher.hpp.

Here is the caller graph for this function:

template<class FaceBase>
void nlsr::SegmentPublisher< FaceBase >::publish ( const ndn::Name &  prefix)
inline

Publish data under the provided prefix.

Processes whatever is provided from SegmentPublisher::generate, by breaking it into segments of MAX_SEGMENT_SIZE and sending each one individually. The last segment is distinguished by having the final block ID set to a timestamp.

Definition at line 80 of file segment-publisher.hpp.