IBR-DTNSuite  0.10
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 update (const ibrcommon::vinterface &iface, DiscoveryAnnouncement &announcement) throw (dtn::net::DiscoveryServiceProvider::NoServiceHereException)
 
void eventNotify (const ibrcommon::LinkEvent &evt)
 
void raiseEvent (const Event *evt) throw ()
 
virtual void resetStats ()
 
virtual const stats_mapgetStats ()
 
- 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::DiscoveryServiceProvider
virtual ~DiscoveryServiceProvider ()
 
- 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)
 
- Protected Member Functions inherited from dtn::net::ConvergenceLayer
virtual void addStats (const std::string &tag, const size_t value)
 
virtual void setStats (const std::string &tag, const size_t value)
 

Friends

class TCPConnection
 

Additional Inherited Members

- Public Types inherited from dtn::net::ConvergenceLayer
typedef std::map< std::string,
size_t > 
stats_map
 

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

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

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 556 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 71 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 589 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 574 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 169 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 253 of file TCPConvergenceLayer.cpp.

const ConvergenceLayer::stats_map & dtn::TCPConvergenceLayer::getStats ( )
virtual

Reimplemented from dtn::net::ConvergenceLayer.

Definition at line 614 of file TCPConvergenceLayer.cpp.

References dtn::net::TCPConnection::getTrafficStats(), and dtn::net::TCPConnection::resetTrafficStats().

Here is the call graph for this function:

void dtn::net::TCPConvergenceLayer::open ( const dtn::core::Node n)
virtual
void dtn::net::TCPConvergenceLayer::raiseEvent ( const Event evt) throw ()
virtual
void dtn::TCPConvergenceLayer::resetStats ( )
virtual

Reimplemented from dtn::net::ConvergenceLayer.

Definition at line 636 of file TCPConvergenceLayer.cpp.

References dtn::net::TCPConnection::resetTrafficStats().

Here is the call graph for this function:

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: