IBR-DTNSuite
0.12
|
#include <BundleStreamBuf.h>
Public Member Functions | |
BundleStreamBuf (dtn::api::Client &client, StreamBundle &chunk, size_t min_buffer, size_t max_buffer, bool wait_seq_zero=false) | |
virtual | ~BundleStreamBuf () |
void | received (const dtn::data::Bundle &b) |
void | flush () |
void | setRequestAck (bool val) |
void | setReceiveTimeout (dtn::data::Timeout timeout) |
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 () |
std::char_traits< char >::int_type | __underflow () |
void | __flush () |
size_t | __get_next_buffer_size () const |
Definition at line 33 of file BundleStreamBuf.h.
BundleStreamBuf::BundleStreamBuf | ( | dtn::api::Client & | client, |
StreamBundle & | chunk, | ||
size_t | min_buffer, | ||
size_t | max_buffer, | ||
bool | wait_seq_zero = false |
||
) |
Definition at line 26 of file BundleStreamBuf.cpp.
References __get_next_buffer_size().
|
virtual |
Definition at line 36 of file BundleStreamBuf.cpp.
|
protected |
Definition at line 61 of file BundleStreamBuf.cpp.
References dtn::data::PrimaryBlock::reportto, dtn::data::PrimaryBlock::REQUEST_REPORT_OF_BUNDLE_DELIVERY, and dtn::data::PrimaryBlock::set().
Referenced by flush(), and overflow().
|
protected |
Definition at line 76 of file BundleStreamBuf.cpp.
References StreamBundle::size().
Referenced by BundleStreamBuf(), and overflow().
|
protected |
Definition at line 166 of file BundleStreamBuf.cpp.
References dtn::data::Bundle::find(), ibrcommon::TimeMeasurement::getSeconds(), ibrcommon::BLOB::Reference::iostream(), ibrcommon::TimeMeasurement::start(), ibrcommon::TimeMeasurement::stop(), and ibrcommon::Conditional::wait().
Referenced by underflow().
void BundleStreamBuf::flush | ( | ) |
Flush the buffer and send out the buffered bundle
Definition at line 43 of file BundleStreamBuf.cpp.
References __flush(), and StreamBundle::size().
Referenced by BundleStream::received(), and sync().
|
protectedvirtual |
Definition at line 105 of file BundleStreamBuf.cpp.
References __flush(), __get_next_buffer_size(), StreamBundle::append(), and StreamBundle::size().
Referenced by sync().
void BundleStreamBuf::received | ( | const dtn::data::Bundle & | b) |
process incoming bundles
Definition at line 139 of file BundleStreamBuf.cpp.
References dtn::data::Bundle::find(), dtn::data::StreamBlock::getSequenceNumber(), and ibrcommon::Conditional::signal().
Referenced by BundleStream::received().
void BundleStreamBuf::setReceiveTimeout | ( | dtn::data::Timeout | timeout) |
Set the timeout for receiving bundles
Definition at line 56 of file BundleStreamBuf.cpp.
Referenced by BundleStream::setReceiveTimeout().
void BundleStreamBuf::setRequestAck | ( | bool | val) |
Request Acks for the chunks
Definition at line 99 of file BundleStreamBuf.cpp.
Referenced by BundleStream::setAutoFlush().
|
protectedvirtual |
Definition at line 88 of file BundleStreamBuf.cpp.
References flush(), and overflow().
|
protectedvirtual |
Definition at line 159 of file BundleStreamBuf.cpp.
References __underflow().