#include <TCPConvergenceLayer.h>
Definition at line 47 of file TCPConvergenceLayer.h.
| dtn::net::TCPConvergenceLayer::TCPConnection::TCPConnection | ( | ibrcommon::tcpstream * | stream | ) |
Definition at line 33 of file TCPConnection.cpp.
References ibrcommon::tcpstream::enableKeepalive(), and dtn::core::Node::setProtocol().
| dtn::net::TCPConvergenceLayer::TCPConnection::~TCPConnection | ( | ) | [virtual] |
Definition at line 40 of file TCPConnection.cpp.
References shutdown().
| void dtn::net::TCPConvergenceLayer::TCPConnection::eventBundleAck | ( | size_t | ack | ) | [virtual] |
This method is called if a ACK is received.
Implements dtn::streams::StreamConnection::Callback.
Definition at line 166 of file TCPConnection.cpp.
| void dtn::net::TCPConvergenceLayer::TCPConnection::eventBundleForwarded | ( | ) | [virtual] |
This method is called if a bundle is refused by the peer.
Implements dtn::streams::StreamConnection::Callback.
Definition at line 148 of file TCPConnection.cpp.
References dtn::core::BUNDLE_FORWARDED, ibrcommon::ThreadSafeQueue< T >::frontpop(), dtn::core::Node::getURI(), dtn::core::BundleEvent::raise(), and dtn::net::TransferCompletedEvent::raise().
| void dtn::net::TCPConvergenceLayer::TCPConnection::eventBundleRefused | ( | ) | [virtual] |
This method is called if a bundle is refused by the peer.
Implements dtn::streams::StreamConnection::Callback.
Definition at line 132 of file TCPConnection.cpp.
References ibrcommon::ThreadSafeQueue< T >::frontpop(), dtn::core::Node::getURI(), and dtn::net::TransferAbortedEvent::raise().
| void dtn::net::TCPConvergenceLayer::TCPConnection::eventConnectionDown | ( | ) | [virtual] |
This method is called if a connection went down.
Implements dtn::streams::StreamConnection::Callback.
Definition at line 99 of file TCPConnection.cpp.
References dtn::net::ConnectionEvent::CONNECTION_DOWN, ibrcommon::ThreadSafeQueue< T >::frontpop(), dtn::core::Node::getURI(), iamfree(), dtn::net::TransferAbortedEvent::raise(), and dtn::net::ConnectionEvent::raise().
| void dtn::net::TCPConvergenceLayer::TCPConnection::eventConnectionUp | ( | const StreamContactHeader & | header | ) | [virtual] |
This method is called if a handshake was successful.
| header |
Implements dtn::streams::StreamConnection::Callback.
Definition at line 90 of file TCPConnection.cpp.
References dtn::streams::StreamContactHeader::_localeid, dtn::net::ConnectionEvent::CONNECTION_UP, dtn::data::EID::getString(), dtn::net::ConnectionEvent::raise(), and dtn::core::Node::setURI().
| void dtn::net::TCPConvergenceLayer::TCPConnection::eventError | ( | ) | [virtual] |
This method is called if a error occured in the stream.
Implements dtn::streams::StreamConnection::Callback.
Definition at line 205 of file TCPConnection.cpp.
| void dtn::net::TCPConvergenceLayer::TCPConnection::eventShutdown | ( | ) | [virtual] |
callback methods for tcpstream
Implements dtn::streams::StreamConnection::Callback.
Definition at line 171 of file TCPConnection.cpp.
| void dtn::net::TCPConvergenceLayer::TCPConnection::eventTimeout | ( | ) | [virtual] |
This method is called if the stream is closed by a TIMEOUT.
Implements dtn::streams::StreamConnection::Callback.
Definition at line 188 of file TCPConnection.cpp.
References dtn::net::ConnectionEvent::CONNECTION_TIMEOUT, and dtn::net::ConnectionEvent::raise().
| bool dtn::net::TCPConvergenceLayer::TCPConnection::free | ( | ) | [virtual] |
Implements dtn::net::GenericConnection.
Definition at line 50 of file TCPConnection.cpp.
| dtn::core::Node::Protocol dtn::net::TCPConvergenceLayer::TCPConnection::getDiscoveryProtocol | ( | ) | const |
| const StreamContactHeader dtn::net::TCPConvergenceLayer::TCPConnection::getHeader | ( | ) | const |
| const dtn::core::Node & dtn::net::TCPConvergenceLayer::TCPConnection::getNode | ( | ) | const |
Get the associated Node object
Definition at line 223 of file TCPConnection.cpp.
Referenced by dtn::net::TCPConvergenceLayer::Server::accept(), and dtn::net::TCPConvergenceLayer::Server::connectionUp().
| void dtn::net::TCPConvergenceLayer::TCPConnection::handshake | ( | ) | [protected] |
Definition at line 66 of file TCPConnection.cpp.
References dtn::streams::StreamConnection::handshake(), dtn::streams::StreamContactHeader::REQUEST_ACKNOWLEDGMENTS, and dtn::streams::StreamContactHeader::REQUEST_NEGATIVE_ACKNOWLEDGMENTS.
| void dtn::net::TCPConvergenceLayer::TCPConnection::iamfree | ( | ) |
This method sets this instance free. (Mark it for the "garbage collector".)
Definition at line 45 of file TCPConnection.cpp.
Referenced by eventConnectionDown().
| void dtn::net::TCPConvergenceLayer::TCPConnection::initialize | ( | const dtn::data::EID & | name, | |
| const size_t | timeout = 10 | |||
| ) |
initialize this connection by send and receive the connection header.
| header |
Definition at line 81 of file TCPConnection.cpp.
Referenced by dtn::net::TCPConvergenceLayer::Server::accept().
| void dtn::net::TCPConvergenceLayer::TCPConnection::queue | ( | const dtn::data::Bundle & | bundle | ) |
queue a bundle for this connection
| bundle |
Definition at line 56 of file TCPConnection.cpp.
Referenced by dtn::net::TCPConvergenceLayer::Server::queue().
| void dtn::net::TCPConvergenceLayer::TCPConnection::rejectTransmission | ( | ) | [protected] |
Definition at line 228 of file TCPConnection.cpp.
References dtn::streams::StreamConnection::reject().
Referenced by dtn::net::operator>>().
| void dtn::net::TCPConvergenceLayer::TCPConnection::shutdown | ( | ) | [virtual] |
shutdown the whole tcp connection
Implements dtn::net::GenericConnection.
Definition at line 218 of file TCPConnection.cpp.
References dtn::streams::StreamConnection::shutdown().
Referenced by ~TCPConnection().
| TCPConvergenceLayer::TCPConnection& operator<< | ( | TCPConvergenceLayer::TCPConnection & | conn, | |
| const dtn::data::Bundle & | bundle | |||
| ) | [friend] |
Definition at line 245 of file TCPConnection.cpp.
| TCPConvergenceLayer::TCPConnection& operator>> | ( | TCPConvergenceLayer::TCPConnection & | conn, | |
| dtn::data::Bundle & | bundle | |||
| ) | [friend] |
Definition at line 233 of file TCPConnection.cpp.
1.6.3