dtn::UDPConvergenceLayer::Sender Class Reference

#include <UDPConvergenceLayer.h>

Inheritance diagram for dtn::UDPConvergenceLayer::Sender:

dtn::CLInfo Logger

List of all members.


Detailed Description

Definition at line 166 of file UDPConvergenceLayer.h.


Public Member Functions

virtual ~Sender ()
 Destructor.
bool init (Params *params, in_addr_t addr, u_int16_t port)
 Initialize the sender (the "real" constructor).

Private Member Functions

 Sender (const ContactRef &contact)
 Constructor.
int send_bundle (const BundleRef &bundle)
 Send one bundle.

Private Attributes

Paramsparams_
 Pointer to the link parameters.
oasys::UDPClient socket_
 The udp client socket.
oasys::RateLimitedSocket rate_socket_
 Rate-limited socket that's optionally enabled.
ContactRef contact_
 The contact that we're representing.
u_char buf_ [UDPConvergenceLayer::MAX_BUNDLE_LEN]
 Temporary buffer for formatting bundles.

Friends

class UDPConvergenceLayer

Constructor & Destructor Documentation

virtual dtn::UDPConvergenceLayer::Sender::~Sender (  )  [inline, virtual]

Destructor.

Definition at line 171 of file UDPConvergenceLayer.h.

dtn::UDPConvergenceLayer::Sender::Sender ( const ContactRef contact  )  [private]

Constructor.

Definition at line 419 of file UDPConvergenceLayer.cc.


Member Function Documentation

bool dtn::UDPConvergenceLayer::Sender::init ( Params params,
in_addr_t  addr,
u_int16_t  port 
)

int dtn::UDPConvergenceLayer::Sender::send_bundle ( const BundleRef bundle  )  [private]

Send one bundle.

Returns:
the length of the bundle sent or -1 on error

Definition at line 474 of file UDPConvergenceLayer.cc.

References ASSERT, buf_, contact_, errno, dtn::UDPConvergenceLayer::MAX_BUNDLE_LEN, dtn::BundleProtocol::produce(), socket_, and dtn::BundleProtocol::total_length().

Referenced by dtn::UDPConvergenceLayer::bundle_queued().


Friends And Related Function Documentation

friend class UDPConvergenceLayer [friend]

Definition at line 179 of file UDPConvergenceLayer.h.


Member Data Documentation

Pointer to the link parameters.

Definition at line 195 of file UDPConvergenceLayer.h.

Referenced by init().

oasys::UDPClient dtn::UDPConvergenceLayer::Sender::socket_ [private]

The udp client socket.

Definition at line 200 of file UDPConvergenceLayer.h.

Referenced by init(), and send_bundle().

oasys::RateLimitedSocket dtn::UDPConvergenceLayer::Sender::rate_socket_ [private]

Rate-limited socket that's optionally enabled.

Definition at line 205 of file UDPConvergenceLayer.h.

Referenced by init().

The contact that we're representing.

Definition at line 210 of file UDPConvergenceLayer.h.

Referenced by dtn::UDPConvergenceLayer::bundle_queued(), and send_bundle().

Temporary buffer for formatting bundles.

Note that the fixed-length buffer is big enough since UDP packets can't be any bigger than that.

Definition at line 217 of file UDPConvergenceLayer.h.

Referenced by send_bundle().


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

Generated on Mon Jul 21 14:12:21 2008 for DTN Reference Implementation by  doxygen 1.5.6