Segment Publisher to publish segmented data. More...
#include <segment-publisher.hpp>
Public Member Functions | |
SegmentPublisher (ndn::Face &face, ndn::KeyChain &keyChain, size_t imsLimit=100) | |
void | publish (const ndn::Name &interestName, const ndn::Name &dataName, const ndn::Block &block, ndn::time::milliseconds freshness, const ndn::security::SigningInfo &signingInfo=ndn::security::SigningInfo()) |
Put all the segments in memory. More... | |
void | publish (const ndn::Name &interestName, const ndn::Name &dataName, const ndn::ConstBufferPtr &buffer, ndn::time::milliseconds freshness, const ndn::security::SigningInfo &signingInfo=ndn::security::SigningInfo()) |
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... | |
Segment Publisher to publish segmented data.
Definition at line 37 of file segment-publisher.hpp.
psync::SegmentPublisher::SegmentPublisher | ( | ndn::Face & | face, |
ndn::KeyChain & | keyChain, | ||
size_t | imsLimit = 100 |
||
) |
Definition at line 26 of file segment-publisher.cpp.
void psync::SegmentPublisher::publish | ( | const ndn::Name & | interestName, |
const ndn::Name & | dataName, | ||
const ndn::Block & | block, | ||
ndn::time::milliseconds | freshness, | ||
const ndn::security::SigningInfo & | signingInfo = ndn::security::SigningInfo() |
||
) |
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 |
block | the content of the data |
freshness | freshness of the segments |
signingInfo | signing info to sign the data with |
Definition at line 35 of file segment-publisher.cpp.
void psync::SegmentPublisher::publish | ( | const ndn::Name & | interestName, |
const ndn::Name & | dataName, | ||
const ndn::ConstBufferPtr & | buffer, | ||
ndn::time::milliseconds | freshness, | ||
const ndn::security::SigningInfo & | signingInfo = ndn::security::SigningInfo() |
||
) |
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 of the segments |
signingInfo | signing info to sign the data with |
Definition at line 44 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 99 of file segment-publisher.cpp.