IBR-DTNSuite
0.8
|
#include <OrderedStreamHandler.h>
Classes | |
class | Sender |
Public Member Functions | |
OrderedStreamHandler (ClientHandler &client, ibrcommon::tcpstream &stream) | |
virtual | ~OrderedStreamHandler () |
virtual void | run () |
virtual void | finally () |
virtual void | __cancellation () |
virtual void | put (dtn::data::Bundle &b) |
virtual dtn::data::MetaBundle | get (size_t timeout=0) |
virtual void | delivered (const dtn::data::MetaBundle &m) |
Definition at line 21 of file OrderedStreamHandler.h.
dtn::api::OrderedStreamHandler::OrderedStreamHandler | ( | ClientHandler & | client, |
ibrcommon::tcpstream & | stream | ||
) |
Definition at line 28 of file OrderedStreamHandler.cpp.
References dtn::api::Registration::getDefaultEID(), and dtn::api::ClientHandler::getRegistration().
dtn::api::OrderedStreamHandler::~OrderedStreamHandler | ( | ) | [virtual] |
Definition at line 34 of file OrderedStreamHandler.cpp.
void dtn::api::OrderedStreamHandler::__cancellation | ( | ) | [virtual] |
Implements dtn::api::ProtocolHandler.
Definition at line 97 of file OrderedStreamHandler.cpp.
References dtn::api::ProtocolHandler::_stream, and ibrcommon::tcpstream::close().
void dtn::api::OrderedStreamHandler::delivered | ( | const dtn::data::MetaBundle & | m | ) | [virtual] |
Implements dtn::api::BundleStreamBufCallback.
Definition at line 40 of file OrderedStreamHandler.cpp.
References dtn::api::ProtocolHandler::_client, dtn::api::Registration::delivered(), and dtn::api::ClientHandler::getRegistration().
void dtn::api::OrderedStreamHandler::finally | ( | void | ) | [virtual] |
Implements dtn::api::ProtocolHandler.
Definition at line 105 of file OrderedStreamHandler.cpp.
References dtn::api::ProtocolHandler::_client, dtn::api::ProtocolHandler::_stream, dtn::api::Registration::abort(), ibrcommon::tcpstream::close(), dtn::api::ClientHandler::getRegistration(), IBRCOMMON_LOGGER_DEBUG, and IBRCOMMON_LOGGER_ENDL.
dtn::data::MetaBundle dtn::api::OrderedStreamHandler::get | ( | size_t | timeout = 0 | ) | [virtual] |
Implements dtn::api::BundleStreamBufCallback.
Definition at line 72 of file OrderedStreamHandler.cpp.
References dtn::api::ProtocolHandler::_client, dtn::api::ClientHandler::getRegistration(), dtn::data::EID::getString(), IBRCOMMON_LOGGER_DEBUG, IBRCOMMON_LOGGER_ENDL, dtn::api::Registration::receiveMetaBundle(), dtn::data::BundleID::source, and dtn::api::Registration::wait_for_bundle().
void dtn::api::OrderedStreamHandler::put | ( | dtn::data::Bundle & | b | ) | [virtual] |
Implements dtn::api::BundleStreamBufCallback.
Definition at line 45 of file OrderedStreamHandler.cpp.
References dtn::api::ProtocolHandler::_client, dtn::data::PrimaryBlock::_destination, dtn::data::PrimaryBlock::_lifetime, dtn::data::PrimaryBlock::_source, dtn::data::PrimaryBlock::DESTINATION_IS_SINGLETON, dtn::api::Registration::getDefaultEID(), dtn::api::ClientHandler::getRegistration(), IBRCOMMON_LOGGER_DEBUG, IBRCOMMON_LOGGER_ENDL, dtn::net::BundleReceivedEvent::raise(), and dtn::data::PrimaryBlock::set().
void dtn::api::OrderedStreamHandler::run | ( | void | ) | [virtual] |
Implements dtn::api::ProtocolHandler.
Definition at line 122 of file OrderedStreamHandler.cpp.
References dtn::api::ProtocolHandler::_client, dtn::api::ProtocolHandler::_stream, dtn::api::ClientHandler::API_STATUS_BAD_REQUEST, dtn::api::ClientHandler::API_STATUS_CONTINUE, dtn::api::ClientHandler::API_STATUS_NOT_ACCEPTABLE, dtn::api::ClientHandler::API_STATUS_OK, dtn::api::ClientHandler::getRegistration(), dtn::core::BundleCore::local, dtn::api::BundleStreamBuf::setChunkSize(), dtn::api::BundleStreamBuf::setTimeout(), dtn::api::Registration::subscribe(), and dtn::utils::Utils::tokenize().