Classes | Public Member Functions | Protected Member Functions | Friends

dtn::net::TCPConvergenceLayer::TCPConnection Class Reference

#include <TCPConvergenceLayer.h>

Inherits GenericConnection< TCPConvergenceLayer::TCPConnection >, dtn::streams::StreamConnection::Callback, and ibrcommon::DetachedThread.

Collaboration diagram for dtn::net::TCPConvergenceLayer::TCPConnection:
Collaboration graph
[legend]

List of all members.

Classes

class  Sender

Public Member Functions

 TCPConnection (GenericServer< TCPConnection > &tcpsrv, ibrcommon::tcpstream *stream, const dtn::data::EID &name, const size_t timeout=10)
virtual ~TCPConnection ()
virtual void initialize ()
void shutdown ()
const StreamContactHeader getHeader () const
const dtn::core::NodegetNode () const
virtual void eventShutdown (StreamConnection::ConnectionShutdownCases csc)
virtual void eventTimeout ()
virtual void eventError ()
virtual void eventConnectionUp (const StreamContactHeader &header)
virtual void eventConnectionDown ()
virtual void eventBundleRefused ()
virtual void eventBundleForwarded ()
virtual void eventBundleAck (size_t ack)
dtn::core::Node::Protocol getDiscoveryProtocol () const
void queue (const dtn::data::BundleID &bundle)

Protected Member Functions

void rejectTransmission ()
void run ()
void finally ()
void clearQueue ()
void keepalive ()

Friends

TCPConvergenceLayer::TCPConnectionoperator>> (TCPConvergenceLayer::TCPConnection &conn, dtn::data::Bundle &bundle)
TCPConvergenceLayer::TCPConnectionoperator<< (TCPConvergenceLayer::TCPConnection &conn, const dtn::data::Bundle &bundle)

Detailed Description

Definition at line 48 of file TCPConvergenceLayer.h.


Constructor & Destructor Documentation

dtn::net::TCPConvergenceLayer::TCPConnection::TCPConnection ( GenericServer< TCPConnection > &  tcpsrv,
ibrcommon::tcpstream stream,
const dtn::data::EID name,
const size_t  timeout = 10 
)
dtn::net::TCPConvergenceLayer::TCPConnection::~TCPConnection (  )  [virtual]

Definition at line 51 of file TCPConnection.cpp.


Member Function Documentation

void dtn::net::TCPConvergenceLayer::TCPConnection::clearQueue (  )  [protected]

Definition at line 401 of file TCPConnection.cpp.

References dtn::core::Node::getURI(), dtn::net::TransferAbortedEvent::raise(), and dtn::net::TransferAbortedEvent::REASON_CONNECTION_DOWN.

Referenced by finally().

Here is the call graph for this function:

void dtn::net::TCPConvergenceLayer::TCPConnection::eventBundleAck ( size_t  ack  )  [virtual]

Definition at line 156 of file TCPConnection.cpp.

void dtn::net::TCPConvergenceLayer::TCPConnection::eventBundleForwarded (  )  [virtual]
void dtn::net::TCPConvergenceLayer::TCPConnection::eventBundleRefused (  )  [virtual]
void dtn::net::TCPConvergenceLayer::TCPConnection::eventConnectionDown (  )  [virtual]
void dtn::net::TCPConvergenceLayer::TCPConnection::eventConnectionUp ( const StreamContactHeader header  )  [virtual]
void dtn::net::TCPConvergenceLayer::TCPConnection::eventError (  )  [virtual]

Definition at line 88 of file TCPConnection.cpp.

void dtn::net::TCPConvergenceLayer::TCPConnection::eventShutdown ( StreamConnection::ConnectionShutdownCases  csc  )  [virtual]

callback methods for tcpstream

Definition at line 75 of file TCPConnection.cpp.

void dtn::net::TCPConvergenceLayer::TCPConnection::eventTimeout (  )  [virtual]

Definition at line 79 of file TCPConnection.cpp.

References dtn::net::ConnectionEvent::CONNECTION_TIMEOUT, dtn::net::ConnectionEvent::raise(), and ibrcommon::DetachedThread::stop().

Here is the call graph for this function:

void dtn::net::TCPConvergenceLayer::TCPConnection::finally ( void   )  [protected, virtual]
dtn::core::Node::Protocol dtn::net::TCPConvergenceLayer::TCPConnection::getDiscoveryProtocol (  )  const
const StreamContactHeader dtn::net::TCPConvergenceLayer::TCPConnection::getHeader (  )  const

Get the header of this connection

Returns:

Definition at line 60 of file TCPConnection.cpp.

const dtn::core::Node & dtn::net::TCPConvergenceLayer::TCPConnection::getNode (  )  const

Get the associated Node object

Returns:

Definition at line 65 of file TCPConnection.cpp.

Referenced by dtn::net::TCPConvergenceLayer::Server::accept(), and dtn::net::TCPConvergenceLayer::Server::connectionUp().

void dtn::net::TCPConvergenceLayer::TCPConnection::initialize (  )  [virtual]

This method is called by the GenericServer thread after accept()

Definition at line 161 of file TCPConnection.cpp.

References IBRCOMMON_LOGGER, ibrcommon::DetachedThread::start(), and ibrcommon::Exception::what().

Here is the call graph for this function:

void dtn::net::TCPConvergenceLayer::TCPConnection::keepalive (  )  [protected]

Definition at line 428 of file TCPConnection.cpp.

References dtn::streams::StreamConnection::keepalive().

Here is the call graph for this function:

void dtn::net::TCPConvergenceLayer::TCPConnection::queue ( const dtn::data::BundleID bundle  ) 

queue a bundle for this connection

Parameters:
bundle 

Definition at line 55 of file TCPConnection.cpp.

void dtn::net::TCPConvergenceLayer::TCPConnection::rejectTransmission (  )  [protected]

Definition at line 70 of file TCPConnection.cpp.

References dtn::streams::StreamConnection::reject().

Referenced by run().

Here is the call graph for this function:

void dtn::net::TCPConvergenceLayer::TCPConnection::run (  )  [protected, virtual]
void dtn::net::TCPConvergenceLayer::TCPConnection::shutdown (  ) 

shutdown the whole tcp connection

Definition at line 171 of file TCPConnection.cpp.

References IBRCOMMON_LOGGER_DEBUG, dtn::streams::StreamConnection::shutdown(), ibrcommon::DetachedThread::stop(), and ibrcommon::Exception::what().

Here is the call graph for this function:


Friends And Related Function Documentation

TCPConvergenceLayer::TCPConnection& operator<< ( TCPConvergenceLayer::TCPConnection conn,
const dtn::data::Bundle bundle 
) [friend]

Definition at line 274 of file TCPConnection.cpp.

Definition at line 263 of file TCPConnection.cpp.


The documentation for this class was generated from the following files: