IBR-DTNSuite
0.10
|
#include <BundleStream.h>
Public Member Functions | |
BundleStream (ibrcommon::socketstream &stream, size_t min_chunk_size, size_t max_chunk_size, const std::string &app="stream", const dtn::data::EID &group=dtn::data::EID(), bool wait_seq_zero=false) | |
virtual | ~BundleStream () |
BundleStreamBuf & | rdbuf () |
dtn::data::Bundle & | base () |
void | setAutoFlush (bool val) |
void | setReceiveTimeout (unsigned int timeout) |
Public Member Functions inherited from dtn::api::Client | |
Client (const std::string &app, ibrcommon::socketstream &stream, const COMMUNICATION_MODE mode=MODE_BIDIRECTIONAL) | |
Client (const std::string &app, const dtn::data::EID &group, ibrcommon::socketstream &stream, const COMMUNICATION_MODE mode=MODE_BIDIRECTIONAL) | |
virtual | ~Client () |
void | connect () |
void | close () |
void | abort () |
virtual void | eventConnectionDown () throw () |
virtual void | eventBundleAck (const dtn::data::Length &ack) throw () |
virtual void | eventShutdown (StreamConnection::ConnectionShutdownCases) throw () |
virtual void | eventTimeout () throw () |
virtual void | eventError () throw () |
virtual void | eventConnectionUp (const dtn::streams::StreamContactHeader &) throw () |
virtual void | eventBundleRefused () throw () |
virtual void | eventBundleForwarded () throw () |
void | operator<< (const dtn::data::Bundle &b) |
dtn::data::Bundle | getBundle (const dtn::data::Timeout timeout=0) throw (ConnectionException) |
Public Member Functions inherited from dtn::streams::StreamConnection | |
StreamConnection (StreamConnection::Callback &cb, iostream &stream, const dtn::data::Length buffer_size=4096) | |
virtual | ~StreamConnection () |
void | handshake (const dtn::data::EID &eid, const dtn::data::Timeout &timeout, const dtn::data::Bitset< StreamContactHeader::HEADER_BITS > &flags) |
void | shutdown (ConnectionShutdownCases csc=CONNECTION_SHUTDOWN_SIMPLE_SHUTDOWN) |
void | reject () |
void | keepalive () |
void | enableIdleTimeout (const dtn::data::Timeout &seconds) |
void | setMonitor (bool val) |
void | resetMonitorStats () |
size_t | getMonitorStat (int index) |
Public Member Functions inherited from dtn::streams::StreamConnection::Callback | |
virtual void | eventShutdown (StreamConnection::ConnectionShutdownCases csc)=0 throw () |
Protected Member Functions | |
virtual void | received (const dtn::data::Bundle &b) |
Protected Member Functions inherited from dtn::api::Client | |
virtual void | received (const dtn::streams::StreamContactHeader &) |
Additional Inherited Members | |
Public Types inherited from dtn::api::Client | |
enum | COMMUNICATION_MODE { MODE_BIDIRECTIONAL = 0, MODE_SENDONLY = 1 } |
Public Attributes inherited from dtn::api::Client | |
dtn::data::Length | lastack |
Definition at line 35 of file BundleStream.h.
BundleStream::BundleStream | ( | ibrcommon::socketstream & | stream, |
size_t | min_chunk_size, | ||
size_t | max_chunk_size, | ||
const std::string & | app = "stream" , |
||
const dtn::data::EID & | group = dtn::data::EID() , |
||
bool | wait_seq_zero = false |
||
) |
Definition at line 25 of file BundleStream.cpp.
|
virtual |
Definition at line 29 of file BundleStream.cpp.
dtn::data::Bundle & BundleStream::base | ( | ) |
Definition at line 36 of file BundleStream.cpp.
Referenced by main().
BundleStreamBuf & BundleStream::rdbuf | ( | ) |
Definition at line 31 of file BundleStream.cpp.
Referenced by main().
|
protectedvirtual |
Reimplemented from dtn::api::Client.
Definition at line 52 of file BundleStream.cpp.
References dtn::data::PrimaryBlock::APPDATA_IS_ADMRECORD, dtn::data::StatusReportBlock::bundleid, dtn::data::Bundle::find(), BundleStreamBuf::flush(), dtn::data::PrimaryBlock::get(), dtn::data::StatusReportBlock::read(), BundleStreamBuf::received(), and dtn::data::BundleID::source.
void BundleStream::setAutoFlush | ( | bool | val | ) |
Enable automatic flush using Status Reports
Definition at line 41 of file BundleStream.cpp.
References BundleStreamBuf::setRequestAck().
Referenced by main().
void BundleStream::setReceiveTimeout | ( | unsigned int | timeout | ) |
Set the timeout for receiving bundles
Definition at line 47 of file BundleStream.cpp.
References BundleStreamBuf::setReceiveTimeout().
Referenced by main().