IBR-DTNSuite  0.12
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::core::Event *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
virtual ~EventReceiver ()=0
 
- 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 ()
 
- Public Member Functions inherited from ibrcommon::LinkManager::EventCallback
virtual ~EventCallback ()
 

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 ()
 
- Protected Member Functions inherited from ibrcommon::JoinableThread
virtual ~JoinableThread ()=0
 
void join (void) throw (ThreadException)
 
bool isRunning (void)
 
void start (int priority=0) throw (ThreadException)
 
void stop () throw ()
 
 JoinableThread (size_t size=DEFAULT_STACKSIZE)
 

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 51 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.

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 578 of file TCPConvergenceLayer.cpp.

References ibrcommon::vsocket::down().

Here is the call graph for this function:

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 75 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 611 of file TCPConvergenceLayer.cpp.

References ibrcommon::vsocket::down(), ibrcommon::LogLevel::error, IBRCOMMON_LOGGER_ENDL, IBRCOMMON_LOGGER_TAG, dtn::core::EventDispatcher< E >::remove(), ibrcommon::Conditional::wait(), and ibrcommon::Exception::what().

Here is the call graph for this function:

void dtn::net::TCPConvergenceLayer::componentRun ( )
throw (
)
protectedvirtual
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 596 of file TCPConvergenceLayer.cpp.

References dtn::core::EventDispatcher< E >::add(), ibrcommon::LogLevel::error, IBRCOMMON_LOGGER_ENDL, IBRCOMMON_LOGGER_TAG, ibrcommon::vsocket::up(), and ibrcommon::Exception::what().

Here is the call graph for this function:

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

Returns the discovery protocol type

Returns

Implements dtn::net::ConvergenceLayer.

Definition at line 176 of file TCPConvergenceLayer.cpp.

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

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

Implements dtn::daemon::Component.

Definition at line 260 of file TCPConvergenceLayer.cpp.

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

Reimplemented from dtn::net::ConvergenceLayer.

Definition at line 636 of file TCPConvergenceLayer.cpp.

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

Here is the call graph for this function:

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

Reimplemented from dtn::net::ConvergenceLayer.

Definition at line 651 of file TCPConvergenceLayer.cpp.

Friends And Related Function Documentation

friend class TCPConnection
friend

Definition at line 53 of file TCPConvergenceLayer.h.

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


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