#include <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 | |
Params * | params_ |
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 |
Definition at line 166 of file UDPConvergenceLayer.h.
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.
Initialize the sender (the "real" constructor).
Definition at line 430 of file UDPConvergenceLayer.cc.
References dtn::UDPConvergenceLayer::Params::bucket_depth_, errno, dtn::UDPConvergenceLayer::Params::local_addr_, dtn::UDPConvergenceLayer::Params::local_port_, params_, dtn::UDPConvergenceLayer::Params::rate_, rate_socket_, and socket_.
Referenced by dtn::UDPConvergenceLayer::open_contact().
int dtn::UDPConvergenceLayer::Sender::send_bundle | ( | const BundleRef & | bundle | ) | [private] |
Send one bundle.
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().
friend class UDPConvergenceLayer [friend] |
Definition at line 179 of file UDPConvergenceLayer.h.
u_char dtn::UDPConvergenceLayer::Sender::buf_[UDPConvergenceLayer::MAX_BUNDLE_LEN] [private] |
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 contact that we're representing.
Definition at line 210 of file UDPConvergenceLayer.h.
Referenced by dtn::UDPConvergenceLayer::bundle_queued(), and send_bundle().
Params* dtn::UDPConvergenceLayer::Sender::params_ [private] |
Pointer to the link parameters.
Definition at line 195 of file UDPConvergenceLayer.h.
Referenced by init().
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().
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().