20 #ifndef PSYNC_SEGMENT_PUBLISHER_HPP
21 #define PSYNC_SEGMENT_PUBLISHER_HPP
25 #include <ndn-cxx/face.hpp>
26 #include <ndn-cxx/ims/in-memory-storage-fifo.hpp>
27 #include <ndn-cxx/util/scheduler.hpp>
28 #include <ndn-cxx/util/segmenter.hpp>
39 const ndn::security::SigningInfo& signingInfo = ndn::security::SigningInfo(),
40 size_t imsLimit = 100);
51 publish(
const ndn::Name& interestName,
const ndn::Name& dataName,
52 ndn::span<const uint8_t> buffer, ndn::time::milliseconds freshness);
64 ndn::Scheduler m_scheduler;
65 ndn::Segmenter m_segmenter;
68 ndn::InMemoryStorageFifo m_ims;
#define PSYNC_PUBLIC_WITH_TESTS_ELSE_PRIVATE
Helper class to publish segmented data.
bool replyFromStore(const ndn::Name &interestName)
Try to reply from memory, return false if we cannot find the segment.
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.