IBR-DTN  1.0.0
dtn::net::TCPConvergenceLayer Class Reference

#include <TCPConvergenceLayer.h>

Inheritance diagram for dtn::net::TCPConvergenceLayer:
Inheritance graph
Collaboration diagram for dtn::net::TCPConvergenceLayer:
Collaboration graph

Public Member Functions

 TCPConvergenceLayer ()
 
virtual ~TCPConvergenceLayer ()
 
void add (const ibrcommon::vinterface &net, int port) throw ()
 
void queue (const dtn::core::Node &n, const dtn::net::BundleTransfer &job)
 
void open (const dtn::core::Node &n)
 
virtual const std::string getName () const
 
dtn::core::Node::Protocol getDiscoveryProtocol () const
 
void onUpdateBeacon (const ibrcommon::vinterface &iface, DiscoveryBeacon &beacon) throw (NoServiceHereException)
 
void eventNotify (const ibrcommon::LinkEvent &evt)
 
void raiseEvent (const dtn::net::P2PDialupEvent &evt) throw ()
 
virtual void resetStats ()
 
virtual void getStats (ConvergenceLayer::stats_data &data) const
 
- Public Member Functions inherited from dtn::daemon::IndependentComponent
 IndependentComponent ()
 
virtual ~IndependentComponent ()
 
virtual void initialize () throw ()
 
virtual void startup () throw ()
 
virtual void terminate () throw ()
 
- Public Member Functions inherited from dtn::daemon::Component
virtual ~Component ()=0
 
- Public Member Functions inherited from dtn::core::EventReceiver< dtn::net::P2PDialupEvent >
virtual ~EventReceiver ()
 
- Public Member Functions inherited from dtn::net::ConvergenceLayer
virtual ~ConvergenceLayer ()=0
 
- Public Member Functions inherited from dtn::net::DiscoveryBeaconHandler
virtual ~DiscoveryBeaconHandler ()=0
 
virtual void onAdvertiseBeacon (const ibrcommon::vinterface &iface, const DiscoveryBeacon &beacon) throw ()
 

Protected Member Functions

void __cancellation () throw ()
 
void componentUp () throw ()
 
void componentRun () throw ()
 
void componentDown () throw ()
 
- Protected Member Functions inherited from dtn::daemon::IndependentComponent
void run () throw ()
 

Friends

class TCPConnection
 

Additional Inherited Members

- Public Types inherited from dtn::net::ConvergenceLayer
typedef std::pair< string, string > stats_pair
 
typedef std::map< string, string > stats_data
 

Detailed Description

This class implement a ConvergenceLayer for TCP/IP. http://tools.ietf.org/html/draft-irtf-dtnrg-tcp-clayer-02

Definition at line 52 of file TCPConvergenceLayer.h.

Constructor & Destructor Documentation

dtn::net::TCPConvergenceLayer::TCPConvergenceLayer ( )

Constructor

Parameters
[in]bind_addrThe address to bind.
[in]portThe port to use.

Definition at line 56 of file TCPConvergenceLayer.cpp.

dtn::net::TCPConvergenceLayer::~TCPConvergenceLayer ( )
virtual

Destructor

Definition at line 62 of file TCPConvergenceLayer.cpp.

References dtn::core::BundleCore::getDiscoveryAgent(), dtn::core::BundleCore::getInstance(), and dtn::net::DiscoveryAgent::unregisterService().

Here is the call graph for this function:

Member Function Documentation

void dtn::net::TCPConvergenceLayer::__cancellation ( )
throw (
)
protectedvirtual

This method is called after componentDown() and should should guarantee that blocking calls in componentRun() will unblock.

Implements dtn::daemon::IndependentComponent.

Definition at line 583 of file TCPConvergenceLayer.cpp.

void dtn::net::TCPConvergenceLayer::add ( const ibrcommon::vinterface &  net,
int  port 
)
throw (
)

Add an interface to this convergence layer

Parameters
netInterface to listen on
portPort to listen on

Definition at line 76 of file TCPConvergenceLayer.cpp.

void dtn::net::TCPConvergenceLayer::componentDown ( )
throw (
)
protectedvirtual

This method is called if the component should stop. Clean-up code should be inserted here.

Implements dtn::daemon::IndependentComponent.

Definition at line 616 of file TCPConvergenceLayer.cpp.

References dtn::core::EventDispatcher< E >::remove().

Here is the call graph for this function:

void dtn::net::TCPConvergenceLayer::componentRun ( )
throw (
)
protectedvirtual

This is the run method. The component should loop in there until componentDown() or __cancellation() is called.

Implements dtn::daemon::IndependentComponent.

Definition at line 524 of file TCPConvergenceLayer.cpp.

References dtn::net::TCPConnection::initialize(), and TCPConnection.

Here is the call graph for this function:

void dtn::net::TCPConvergenceLayer::componentUp ( )
throw (
)
protectedvirtual

Is called in preparation of the component. Before componentRun() is called.

Implements dtn::daemon::IndependentComponent.

Definition at line 601 of file TCPConvergenceLayer.cpp.

References dtn::core::EventDispatcher< E >::add().

Here is the call graph for this function:

void dtn::net::TCPConvergenceLayer::eventNotify ( const ibrcommon::LinkEvent &  evt)

Definition at line 313 of file TCPConvergenceLayer.cpp.

dtn::core::Node::Protocol dtn::net::TCPConvergenceLayer::getDiscoveryProtocol ( ) const
virtual

Returns the discovery protocol type

Returns

Implements dtn::net::ConvergenceLayer.

Definition at line 187 of file TCPConvergenceLayer.cpp.

References dtn::core::Node::CONN_TCPIP.

Referenced by dtn::net::TCPConnection::run().

const std::string dtn::net::TCPConvergenceLayer::getName ( ) const
virtual
See Also
Component::getName()

Implements dtn::daemon::Component.

Definition at line 271 of file TCPConvergenceLayer.cpp.

void dtn::TCPConvergenceLayer::getStats ( ConvergenceLayer::stats_data data) const
virtual

Reimplemented from dtn::net::ConvergenceLayer.

Definition at line 641 of file TCPConvergenceLayer.cpp.

References dtn::core::Node::toString().

Here is the call graph for this function:

void dtn::net::TCPConvergenceLayer::onUpdateBeacon ( const ibrcommon::vinterface &  iface,
DiscoveryBeacon beacon 
)
throw (NoServiceHereException
)
virtual

this method updates the given values

Reimplemented from dtn::net::DiscoveryBeaconHandler.

Definition at line 192 of file TCPConvergenceLayer.cpp.

References dtn::daemon::Configuration::Discovery::enableCrosslayer(), dtn::daemon::Configuration::getDiscovery(), and dtn::daemon::Configuration::getInstance().

Here is the call graph for this function:

void dtn::net::TCPConvergenceLayer::open ( const dtn::core::Node n)
virtual

Open a connection to the given node.

Parameters
n
Returns

Reimplemented from dtn::net::ConvergenceLayer.

Definition at line 381 of file TCPConvergenceLayer.cpp.

References dtn::net::ConnectionEvent::CONNECTION_SETUP, dtn::net::TCPConnection::initialize(), dtn::net::TCPConnection::match(), dtn::net::ConnectionEvent::raise(), and TCPConnection.

Here is the call graph for this function:

void dtn::net::TCPConvergenceLayer::queue ( const dtn::core::Node n,
const dtn::net::BundleTransfer job 
)
virtual
void dtn::net::TCPConvergenceLayer::raiseEvent ( const dtn::net::P2PDialupEvent evt)
throw (
)
virtual
void dtn::TCPConvergenceLayer::resetStats ( )
virtual

Reimplemented from dtn::net::ConvergenceLayer.

Definition at line 656 of file TCPConvergenceLayer.cpp.

Friends And Related Function Documentation

friend class TCPConnection
friend

Definition at line 54 of file TCPConvergenceLayer.h.

Referenced by componentRun(), open(), and queue().


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