IBR-DTNSuite
0.8
|
#include <BundleStreamBuf.h>
Classes | |
class | Chunk |
Public Member Functions | |
BundleStreamBuf (BundleStreamBufCallback &callback, size_t chunk_size=4096, bool wait_seq_zero=false) | |
virtual | ~BundleStreamBuf () |
void | setChunkSize (size_t size) |
void | setTimeout (size_t timeout) |
Static Public Attributes | |
static const size_t | BUFF_SIZE = 5120 |
Protected Member Functions | |
virtual int | sync () |
virtual std::char_traits< char > ::int_type | overflow (std::char_traits< char >::int_type=std::char_traits< char >::eof()) |
virtual std::char_traits< char > ::int_type | underflow () |
Definition at line 28 of file BundleStreamBuf.h.
BundleStreamBuf::BundleStreamBuf | ( | BundleStreamBufCallback & | callback, |
size_t | chunk_size = 4096 , |
||
bool | wait_seq_zero = false |
||
) |
Definition at line 18 of file BundleStreamBuf.cpp.
References BUFF_SIZE.
BundleStreamBuf::~BundleStreamBuf | ( | ) | [virtual] |
Definition at line 28 of file BundleStreamBuf.cpp.
std::char_traits< char >::int_type BundleStreamBuf::overflow | ( | std::char_traits< char >::int_type | c = std::char_traits<char>::eof() | ) | [protected, virtual] |
Definition at line 46 of file BundleStreamBuf.cpp.
References BUFF_SIZE, ibrcommon::BLOB::Reference::iostream(), and ibrcommon::BLOB::iostream::size().
Referenced by sync().
void BundleStreamBuf::setChunkSize | ( | size_t | size | ) |
Definition at line 108 of file BundleStreamBuf.cpp.
Referenced by dtn::api::OrderedStreamHandler::run().
void BundleStreamBuf::setTimeout | ( | size_t | timeout | ) |
Definition at line 113 of file BundleStreamBuf.cpp.
Referenced by dtn::api::OrderedStreamHandler::run().
int BundleStreamBuf::sync | ( | ) | [protected, virtual] |
Definition at line 34 of file BundleStreamBuf.cpp.
References overflow().
std::char_traits< char >::int_type BundleStreamBuf::underflow | ( | ) | [protected, virtual] |
Definition at line 125 of file BundleStreamBuf.cpp.
References BUFF_SIZE, dtn::api::BundleStreamBufCallback::delivered(), dtn::api::BundleStreamBufCallback::get(), dtn::storage::BundleStorage::get(), dtn::data::PayloadBlock::getBLOB(), dtn::data::Bundle::getBlock(), dtn::core::BundleCore::getInstance(), ibrcommon::TimeMeasurement::getSeconds(), dtn::core::BundleCore::getStorage(), IBRCOMMON_LOGGER_DEBUG, IBRCOMMON_LOGGER_ENDL, ibrcommon::BLOB::iostream::iostream(), dtn::core::BundleCore::processBlocks(), ibrcommon::TimeMeasurement::start(), and ibrcommon::TimeMeasurement::stop().
const size_t dtn::api::BundleStreamBuf::BUFF_SIZE = 5120 [static] |
Definition at line 32 of file BundleStreamBuf.h.
Referenced by BundleStreamBuf(), overflow(), and underflow().