#include <TCPConvergenceLayer.h>
Inherits dtn::streams::StreamConnection::Callback, and ibrcommon::DetachedThread.

Definition at line 43 of file TCPConvergenceLayer.h.
| dtn::net::TCPConnection::TCPConnection | ( | TCPConvergenceLayer & | tcpsrv, | |
| ibrcommon::tcpstream * | stream, | |||
| const dtn::data::EID & | name, | |||
| const size_t | timeout = 10 | |||
| ) |
Constructor for a new TCPConnection object.
| tcpsrv | ||
| stream | TCP stream to talk to the other peer. | |
| name | ||
| timeout |
Definition at line 41 of file TCPConnection.cpp.
References ibrcommon::tcpstream::enableKeepalive(), ibrcommon::tcpstream::enableLinger(), ibrcommon::tcpstream::enableNoDelay(), dtn::daemon::Configuration::getInstance(), and dtn::core::Node::setProtocol().

| dtn::net::TCPConnection::TCPConnection | ( | TCPConvergenceLayer & | tcpsrv, | |
| const dtn::core::Node & | node, | |||
| const dtn::data::EID & | name, | |||
| const size_t | timeout = 10 | |||
| ) |
Constructor for a new TCPConnection object.
| tcpsrv | ||
| node | The node to talk to. | |
| name | ||
| timeout |
Definition at line 57 of file TCPConnection.cpp.
| dtn::net::TCPConnection::~TCPConnection | ( | ) | [virtual] |
| void dtn::net::TCPConnection::clearQueue | ( | ) | [protected] |
Definition at line 456 of file TCPConnection.cpp.
References ibrcommon::Queue< T >::getnpop(), dtn::core::Node::getURI(), and dtn::routing::RequeueBundleEvent::raise().
Referenced by finally().

| void dtn::net::TCPConnection::eventBundleAck | ( | size_t | ack | ) | [virtual] |
Definition at line 169 of file TCPConnection.cpp.
| void dtn::net::TCPConnection::eventBundleForwarded | ( | ) | [virtual] |
Definition at line 150 of file TCPConnection.cpp.
References dtn::core::BUNDLE_FORWARDED, ibrcommon::Queue< T >::getnpop(), dtn::core::Node::getURI(), IBRCOMMON_LOGGER, dtn::core::BundleEvent::raise(), and dtn::net::TransferCompletedEvent::raise().

| void dtn::net::TCPConnection::eventBundleRefused | ( | ) | [virtual] |
Definition at line 133 of file TCPConnection.cpp.
References ibrcommon::Queue< T >::getnpop(), dtn::core::Node::getURI(), IBRCOMMON_LOGGER, dtn::net::TransferAbortedEvent::raise(), and dtn::net::TransferAbortedEvent::REASON_REFUSED.

| void dtn::net::TCPConnection::eventConnectionDown | ( | ) | [virtual] |
Definition at line 115 of file TCPConnection.cpp.
References dtn::streams::StreamContactHeader::_localeid, dtn::net::ConnectionEvent::CONNECTION_DOWN, IBRCOMMON_LOGGER_DEBUG, dtn::net::ConnectionEvent::raise(), and ibrcommon::Exception::what().

| void dtn::net::TCPConnection::eventConnectionUp | ( | const StreamContactHeader & | header | ) | [virtual] |
Definition at line 105 of file TCPConnection.cpp.
References dtn::streams::StreamContactHeader::_keepalive, dtn::streams::StreamContactHeader::_localeid, dtn::net::ConnectionEvent::CONNECTION_UP, dtn::net::ConnectionEvent::raise(), and dtn::core::Node::setEID().

| void dtn::net::TCPConnection::eventError | ( | ) | [virtual] |
Definition at line 101 of file TCPConnection.cpp.
| void dtn::net::TCPConnection::eventShutdown | ( | StreamConnection::ConnectionShutdownCases | csc | ) | [virtual] |
callback methods for tcpstream
Definition at line 88 of file TCPConnection.cpp.
| void dtn::net::TCPConnection::eventTimeout | ( | ) | [virtual] |
Definition at line 92 of file TCPConnection.cpp.
References dtn::net::ConnectionEvent::CONNECTION_TIMEOUT, dtn::net::ConnectionEvent::raise(), and ibrcommon::DetachedThread::stop().

| void dtn::net::TCPConnection::finally | ( | void | ) | [protected, virtual] |
This method is called when the run() method finishes.
Reimplemented from ibrcommon::Thread.
Definition at line 197 of file TCPConnection.cpp.
References clearQueue(), and IBRCOMMON_LOGGER_DEBUG.

| dtn::core::Node::Protocol dtn::net::TCPConnection::getDiscoveryProtocol | ( | ) | const |
| const StreamContactHeader & dtn::net::TCPConnection::getHeader | ( | ) | const |
| const dtn::core::Node & dtn::net::TCPConnection::getNode | ( | ) | const |
Get the associated Node object
Definition at line 78 of file TCPConnection.cpp.
Referenced by dtn::net::TCPConvergenceLayer::queue().
| void dtn::net::TCPConnection::initialize | ( | ) | [virtual] |
This method is called after accept()
Definition at line 174 of file TCPConnection.cpp.
References IBRCOMMON_LOGGER, ibrcommon::DetachedThread::start(), and ibrcommon::Exception::what().
Referenced by dtn::net::TCPConvergenceLayer::componentRun(), dtn::net::TCPConvergenceLayer::open(), and dtn::net::TCPConvergenceLayer::queue().

| void dtn::net::TCPConnection::keepalive | ( | ) | [protected] |
Definition at line 497 of file TCPConnection.cpp.
References dtn::streams::StreamConnection::keepalive().

| bool dtn::net::TCPConnection::match | ( | const dtn::core::Node & | n | ) | const |
Definition at line 511 of file TCPConnection.cpp.
Referenced by match(), dtn::net::TCPConvergenceLayer::open(), dtn::net::TCPConvergenceLayer::queue(), and dtn::net::TCPConvergenceLayer::raiseEvent().
| bool dtn::net::TCPConnection::match | ( | const dtn::data::EID & | destination | ) | const |
Definition at line 516 of file TCPConnection.cpp.
References dtn::data::EID::getNodeEID(), and dtn::core::Node::getURI().

| bool dtn::net::TCPConnection::match | ( | const dtn::core::NodeEvent & | evt | ) | const |
Definition at line 521 of file TCPConnection.cpp.
References dtn::core::NodeEvent::getNode(), and match().

| void dtn::net::TCPConnection::queue | ( | const dtn::data::BundleID & | bundle | ) |
queue a bundle for this connection
| bundle |
Definition at line 68 of file TCPConnection.cpp.
Referenced by dtn::net::TCPConvergenceLayer::queue().
| void dtn::net::TCPConnection::rejectTransmission | ( | ) | [protected] |
Definition at line 83 of file TCPConnection.cpp.
References dtn::streams::StreamConnection::reject().
Referenced by run().

| void dtn::net::TCPConnection::run | ( | ) | [protected, virtual] |
Abstract interface for thread context run method.
Implements ibrcommon::Thread.
Definition at line 242 of file TCPConnection.cpp.
References dtn::streams::StreamContactHeader::_localeid, dtn::streams::StreamConnection::handshake(), IBRCOMMON_LOGGER, IBRCOMMON_LOGGER_DEBUG, dtn::net::BundleReceivedEvent::raise(), rejectTransmission(), dtn::streams::StreamConnection::shutdown(), ibrcommon::Exception::what(), and ibrcommon::Thread::yield().

| void dtn::net::TCPConnection::setup | ( | void | ) | [protected, virtual] |
This method is called before the run.
Reimplemented from ibrcommon::Thread.
Definition at line 219 of file TCPConnection.cpp.
References dtn::core::Node::getAddress(), dtn::daemon::Configuration::getInstance(), dtn::core::Node::getPort(), dtn::core::Node::getURI(), IBRCOMMON_LOGGER, ibrcommon::tcpclient::open(), dtn::core::Node::setProtocol(), and dtn::streams::StreamConnection::shutdown().

| void dtn::net::TCPConnection::shutdown | ( | ) |
shutdown the whole tcp connection
Definition at line 184 of file TCPConnection.cpp.
References IBRCOMMON_LOGGER_DEBUG, dtn::streams::StreamConnection::shutdown(), ibrcommon::DetachedThread::stop(), and ibrcommon::Exception::what().
Referenced by dtn::net::TCPConvergenceLayer::raiseEvent().

| TCPConnection& operator<< | ( | TCPConnection & | conn, | |
| const dtn::data::Bundle & | bundle | |||
| ) | [friend] |
Definition at line 316 of file TCPConnection.cpp.
| TCPConnection& operator>> | ( | TCPConnection & | conn, | |
| dtn::data::Bundle & | bundle | |||
| ) | [friend] |
Definition at line 305 of file TCPConnection.cpp.
1.7.1