Helper class to publish segmented data. More...
#include <PSync/segment-publisher.hpp>
Public Member Functions | |
SegmentPublisher (ndn::Face &face, ndn::KeyChain &keyChain, const ndn::security::SigningInfo &signingInfo=ndn::security::SigningInfo(), size_t imsLimit=100) | |
void | publish (const ndn::Name &interestName, const ndn::Name &dataName, ndn::span< const uint8_t > buffer, ndn::time::milliseconds freshness) |
Put all the segments in memory. More... | |
bool | replyFromStore (const ndn::Name &interestName) |
Try to reply from memory, return false if we cannot find the segment. More... | |
Helper class to publish segmented data.
Definition at line 35 of file segment-publisher.hpp.
psync::SegmentPublisher::SegmentPublisher | ( | ndn::Face & | face, |
ndn::KeyChain & | keyChain, | ||
const ndn::security::SigningInfo & | signingInfo = ndn::security::SigningInfo() , |
||
size_t | imsLimit = 100 |
||
) |
Definition at line 24 of file segment-publisher.cpp.
void psync::SegmentPublisher::publish | ( | const ndn::Name & | interestName, |
const ndn::Name & | dataName, | ||
ndn::span< const uint8_t > | buffer, | ||
ndn::time::milliseconds | freshness | ||
) |
Put all the segments in memory.
interestName | the interest name, to determine the sequence to be answered immediately |
dataName | the data name, has components after interest name |
buffer | the content of the data |
freshness | freshness period of the segments |
Definition at line 34 of file segment-publisher.cpp.
bool psync::SegmentPublisher::replyFromStore | ( | const ndn::Name & | interestName | ) |
Try to reply from memory, return false if we cannot find the segment.
The caller is then expected to use publish() if this returns false.
Definition at line 56 of file segment-publisher.cpp.