IBR-DTNSuite
0.8
|
#include <TCPConvergenceLayer.h>
Public Member Functions | |
TCPConvergenceLayer () | |
virtual | ~TCPConvergenceLayer () |
void | bind (const ibrcommon::vinterface &net, int port) |
void | queue (const dtn::core::Node &n, const ConvergenceLayer::Job &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, std::string &name, std::string &data) throw (dtn::net::DiscoveryServiceProvider::NoServiceHereException) |
Protected Member Functions | |
void | __cancellation () |
void | componentUp () |
void | componentRun () |
void | componentDown () |
Friends | |
class | TCPConnection |
This class implement a ConvergenceLayer for TCP/IP. http://tools.ietf.org/html/draft-irtf-dtnrg-tcp-clayer-02
Definition at line 223 of file TCPConvergenceLayer.h.
Constructor
[in] | bind_addr | The address to bind. |
[in] | port | The port to use. |
Definition at line 35 of file TCPConvergenceLayer.cpp.
dtn::net::TCPConvergenceLayer::~TCPConvergenceLayer | ( | ) | [virtual] |
Destructor
Definition at line 39 of file TCPConvergenceLayer.cpp.
void dtn::net::TCPConvergenceLayer::__cancellation | ( | ) | [protected, virtual] |
Implements dtn::daemon::IndependentComponent.
Definition at line 262 of file TCPConvergenceLayer.cpp.
void dtn::net::TCPConvergenceLayer::bind | ( | const ibrcommon::vinterface & | net, |
int | port | ||
) |
Bind on a interface
net | |
port |
Definition at line 44 of file TCPConvergenceLayer.cpp.
Referenced by createConvergenceLayers().
void dtn::net::TCPConvergenceLayer::componentDown | ( | ) | [protected, virtual] |
Implements dtn::daemon::IndependentComponent.
Definition at line 287 of file TCPConvergenceLayer.cpp.
void dtn::net::TCPConvergenceLayer::componentRun | ( | ) | [protected, virtual] |
Implements dtn::daemon::IndependentComponent.
Definition at line 228 of file TCPConvergenceLayer.cpp.
References dtn::net::TCPConnection::initialize(), ibrcommon::TLSStream::isInitialized(), dtn::core::BundleCore::local, and ibrcommon::Thread::yield().
void dtn::net::TCPConvergenceLayer::componentUp | ( | ) | [protected, virtual] |
Implements dtn::daemon::IndependentComponent.
Definition at line 281 of file TCPConvergenceLayer.cpp.
dtn::core::Node::Protocol dtn::net::TCPConvergenceLayer::getDiscoveryProtocol | ( | ) | const [virtual] |
Returns the discovery protocol type
Implements dtn::net::ConvergenceLayer.
Definition at line 51 of file TCPConvergenceLayer.cpp.
References dtn::core::Node::CONN_TCPIP.
const std::string dtn::net::TCPConvergenceLayer::getName | ( | ) | const [virtual] |
Implements dtn::daemon::Component.
Definition at line 91 of file TCPConvergenceLayer.cpp.
void dtn::net::TCPConvergenceLayer::open | ( | const dtn::core::Node & | n | ) | [virtual] |
Open a connection to the given node.
n |
Reimplemented from dtn::net::ConvergenceLayer.
Definition at line 96 of file TCPConvergenceLayer.cpp.
References dtn::net::TCPConnection::initialize(), ibrcommon::TLSStream::isInitialized(), dtn::core::BundleCore::local, and dtn::net::TCPConnection::match().
void dtn::net::TCPConvergenceLayer::queue | ( | const dtn::core::Node & | n, |
const ConvergenceLayer::Job & | job | ||
) | [virtual] |
Queue a new transmission job for this convergence layer.
job |
Implements dtn::net::ConvergenceLayer.
Definition at line 139 of file TCPConvergenceLayer.cpp.
References dtn::net::ConvergenceLayer::Job::_bundle, dtn::core::Node::getEID(), dtn::net::TCPConnection::getNode(), IBRCOMMON_LOGGER_DEBUG, IBRCOMMON_LOGGER_ENDL, dtn::net::TCPConnection::initialize(), ibrcommon::TLSStream::isInitialized(), dtn::core::BundleCore::local, dtn::net::TCPConnection::match(), dtn::net::TCPConnection::queue(), dtn::routing::RequeueBundleEvent::raise(), and dtn::core::Node::toString().
void dtn::net::TCPConvergenceLayer::update | ( | const ibrcommon::vinterface & | iface, |
std::string & | name, | ||
std::string & | data | ||
) | throw (dtn::net::DiscoveryServiceProvider::NoServiceHereException) [virtual] |
this method updates the given values
Implements dtn::net::DiscoveryServiceProvider.
Definition at line 56 of file TCPConvergenceLayer.cpp.
References ibrcommon::vinterface::getAddresses(), and ibrcommon::vaddress::VADDRESS_INET.
friend class TCPConnection [friend] |
Definition at line 225 of file TCPConvergenceLayer.h.