#include <UDPConvergenceLayer.h>
Definition at line 128 of file UDPConvergenceLayer.h.
Public Member Functions | |
Receiver (UDPConvergenceLayer::Params *params) | |
Constructor. | |
virtual | ~Receiver () |
Destructor. | |
void | run () |
Loop forever, issuing blocking calls to IPSocket::recvfrom(), then calling the process_data function when new data does arrive. | |
Public Attributes | |
UDPConvergenceLayer::Params | params_ |
Protected Member Functions | |
void | process_data (u_char *bp, size_t len) |
Handler to process an arrived packet. |
dtn::UDPConvergenceLayer::Receiver::Receiver | ( | UDPConvergenceLayer::Params * | params | ) |
virtual dtn::UDPConvergenceLayer::Receiver::~Receiver | ( | ) | [inline, virtual] |
void dtn::UDPConvergenceLayer::Receiver::run | ( | ) |
Loop forever, issuing blocking calls to IPSocket::recvfrom(), then calling the process_data function when new data does arrive.
Note that unlike in the Thread base class, this run() method is public in case we don't want to actually create a new thread for this guy, but instead just want to run the main loop.
Definition at line 390 of file UDPConvergenceLayer.cc.
References buf, errno, and process_data().
void dtn::UDPConvergenceLayer::Receiver::process_data | ( | u_char * | bp, | |
size_t | len | |||
) | [protected] |
Handler to process an arrived packet.
Definition at line 361 of file UDPConvergenceLayer.cc.
References dtn::Bundle::bundleid(), dtn::BundleProtocol::consume(), dtn::EVENTSRC_PEER, dtn::BundlePayload::length(), dtn::EndpointID::NULL_EID(), dtn::Bundle::payload(), and dtn::BundleDaemon::post().
Referenced by run().