IBR-DTN
1.0.0
|
#include <TCPConvergenceLayer.h>
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 |
![]() | |
IndependentComponent () | |
virtual | ~IndependentComponent () |
virtual void | initialize () throw () |
virtual void | startup () throw () |
virtual void | terminate () throw () |
![]() | |
virtual | ~Component ()=0 |
![]() | |
virtual | ~EventReceiver () |
![]() | |
virtual | ~ConvergenceLayer ()=0 |
![]() | |
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 () |
![]() | |
void | run () throw () |
Friends | |
class | TCPConnection |
Additional Inherited Members | |
![]() | |
typedef std::pair< string, string > | stats_pair |
typedef std::map< string, string > | stats_data |
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.
dtn::net::TCPConvergenceLayer::TCPConvergenceLayer | ( | ) |
Constructor
[in] | bind_addr | The address to bind. |
[in] | port | The port to use. |
Definition at line 56 of file TCPConvergenceLayer.cpp.
|
virtual |
Destructor
Definition at line 62 of file TCPConvergenceLayer.cpp.
References dtn::core::BundleCore::getDiscoveryAgent(), dtn::core::BundleCore::getInstance(), and dtn::net::DiscoveryAgent::unregisterService().
|
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
net | Interface to listen on |
port | Port to listen on |
Definition at line 76 of file TCPConvergenceLayer.cpp.
|
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().
|
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.
|
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().
void dtn::net::TCPConvergenceLayer::eventNotify | ( | const ibrcommon::LinkEvent & | evt | ) |
Definition at line 313 of file TCPConvergenceLayer.cpp.
|
virtual |
Returns the discovery protocol type
Implements dtn::net::ConvergenceLayer.
Definition at line 187 of file TCPConvergenceLayer.cpp.
References dtn::core::Node::CONN_TCPIP.
Referenced by dtn::net::TCPConnection::run().
|
virtual |
Implements dtn::daemon::Component.
Definition at line 271 of file TCPConvergenceLayer.cpp.
|
virtual |
Reimplemented from dtn::net::ConvergenceLayer.
Definition at line 641 of file TCPConvergenceLayer.cpp.
References dtn::core::Node::toString().
|
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().
|
virtual |
Open a connection to the given node.
n |
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.
|
virtual |
Queue a new transmission job for this convergence layer.
job |
Implements dtn::net::ConvergenceLayer.
Definition at line 424 of file TCPConvergenceLayer.cpp.
References dtn::net::ConnectionEvent::CONNECTION_SETUP, dtn::net::TCPConnection::getNode(), dtn::net::TCPConnection::initialize(), dtn::net::TCPConnection::match(), dtn::net::TCPConnection::queue(), dtn::net::ConnectionEvent::raise(), TCPConnection, and dtn::core::Node::toString().
|
virtual |
Implements dtn::core::EventReceiver< dtn::net::P2PDialupEvent >.
Definition at line 276 of file TCPConvergenceLayer.cpp.
References dtn::core::BundleCore::getDiscoveryAgent(), dtn::core::BundleCore::getInstance(), dtn::net::P2PDialupEvent::INTERFACE_DOWN, dtn::net::P2PDialupEvent::INTERFACE_UP, and dtn::net::DiscoveryAgent::unregisterService().
|
virtual |
Reimplemented from dtn::net::ConvergenceLayer.
Definition at line 656 of file TCPConvergenceLayer.cpp.
|
friend |
Definition at line 54 of file TCPConvergenceLayer.h.
Referenced by componentRun(), open(), and queue().