#include <UDPConvergenceLayer.h>
Definition at line 161 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 (Bundle *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 |
virtual dtn::UDPConvergenceLayer::Sender::~Sender | ( | ) | [inline, virtual] |
dtn::UDPConvergenceLayer::Sender::Sender | ( | const ContactRef & | contact | ) | [private] |
Initialize the sender (the "real" constructor).
Definition at line 403 of file UDPConvergenceLayer.cc.
References oasys::IPSocket::bind(), oasys::RateLimitedSocket::bucket(), dtn::UDPConvergenceLayer::Params::bucket_depth_, oasys::IPSocket::connect(), errno, INADDR_NONE, intoa, dtn::UDPConvergenceLayer::Params::local_addr_, dtn::UDPConvergenceLayer::Params::local_port_, log_debug, log_err, oasys::Logger::logpath_, oasys::Logger::logpathf(), params_, dtn::UDPConvergenceLayer::Params::rate_, rate_socket_, oasys::IPSocket::set_logfd(), and socket_.
Referenced by dtn::UDPConvergenceLayer::open_contact().
int dtn::UDPConvergenceLayer::Sender::send_bundle | ( | Bundle * | bundle | ) | [private] |
Send one bundle.
Definition at line 447 of file UDPConvergenceLayer.cc.
References ASSERT, buf_, contact_, errno, dtn::LinkBlockSet::find_blocks(), log_err, log_info, dtn::UDPConvergenceLayer::MAX_BUNDLE_LEN, dtn::BundleProtocol::produce(), socket_, dtn::BundleProtocol::total_length(), oasys::IPClient::write(), and dtn::Bundle::xmit_blocks_.
Referenced by dtn::UDPConvergenceLayer::send_bundle().
friend class UDPConvergenceLayer [friend] |
Definition at line 174 of file UDPConvergenceLayer.h.
Params* dtn::UDPConvergenceLayer::Sender::params_ [private] |
Pointer to the link parameters.
Definition at line 190 of file UDPConvergenceLayer.h.
Referenced by init().
The udp client socket.
Definition at line 195 of file UDPConvergenceLayer.h.
Referenced by init(), and send_bundle().
Rate-limited socket that's optionally enabled.
Definition at line 200 of file UDPConvergenceLayer.h.
Referenced by init().
The contact that we're representing.
Definition at line 205 of file UDPConvergenceLayer.h.
Referenced by send_bundle(), and dtn::UDPConvergenceLayer::send_bundle().
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 212 of file UDPConvergenceLayer.h.
Referenced by send_bundle().