TP over UDP

Collaboration diagram for TP over UDP:

Namespaces

namespace  protlib

Functions

virtual void protlib::TPoverUDP::send (NetMsg *msg, const address &addr, bool use_existing_connection)
 sends a network message, spawns receiver thread if necessary
void protlib::TPoverUDP::udpsend (NetMsg *msg, appladdress *addr)
 send a message to the network via UDP
static void * protlib::TPoverUDP::listener_thread_starter (void *argp)
 a static starter method to invoke the listener thread
void protlib::TPoverUDP::listener_thread ()
 listener thread procedure
virtual protlib::TPoverUDP::~TPoverUDP ()
 virtual destructor
virtual void protlib::TPoverUDP::main_loop (uint32 nr)
 main loop
virtual void protlib::TPoverUDP::terminate (const address &addr)
 terminates an existing signaling association/connection

Variables

char protlib::in6_addrstr_loc [INET6_ADDRSTRLEN+1]

Function Documentation

void protlib::TPoverUDP::listener_thread (  )  [private, inherited]

void * protlib::TPoverUDP::listener_thread_starter ( void *  argp  )  [static, private, inherited]

a static starter method to invoke the listener thread

IPv4 catcher thread starter: just a static starter method to allow starting the actual master_listener_thread() method.

Parameters:
argp - pointer to the current TPoverUDP object instance

Definition at line 323 of file tp_over_udp.cpp.

Referenced by protlib::TPoverUDP::main_loop().

void protlib::TPoverUDP::main_loop ( uint32  nr  )  [virtual, inherited]

main loop

TPoverUDP Thread main loop. This loop checks for internal messages of either a send() call to start a new receiver thread, or, of a receiver_thread() that signals its own termination for proper cleanup of control structures.

Parameters:
nr number of current thread instance

Implements protlib::Thread.

Definition at line 570 of file tp_over_udp.cpp.

References protlib::log::color, ERRCLog, protlib::Thread::get_state(), protlib::log::green, protlib::log::INFO_LOG, protlib::TPoverUDP::listener_thread_starter(), Log, protlib::log::LOG_NORMAL, protlib::ThreadParam::name, protlib::log::off, protlib::TPoverUDPParam::port, ariba::utility::Helper::sleep(), protlib::Thread::STATE_ABORT, protlib::Thread::STATE_STOP, and protlib::TPoverUDP::tpparam.

void protlib::TPoverUDP::send ( NetMsg netmsg,
const address in_addr,
bool  use_existing_connection 
) [virtual, inherited]

sends a network message, spawns receiver thread if necessary

generates an internal TPoverUDP message to send a NetMsg to the network

  • the sending thread will call TPoverUDP::udpsend()
  • since UDP is connectionless we can safely ignore the use_existing_connection attribute
    Note:
    the netmsg is deleted by the send() method when it is not used anymore

Implements protlib::TP.

Definition at line 90 of file tp_over_udp.cpp.

References protlib::address::copy(), and protlib::TPoverUDP::udpsend().

void protlib::TPoverUDP::terminate ( const address addr  )  [virtual, inherited]

terminates an existing signaling association/connection

Implements protlib::TP.

Definition at line 620 of file tp_over_udp.cpp.

Referenced by protlib::TPoverUDP::listener_thread().

void protlib::TPoverUDP::udpsend ( NetMsg netmsg,
appladdress addr 
) [private, inherited]

protlib::TPoverUDP::~TPoverUDP (  )  [virtual, inherited]


Variable Documentation

char protlib::in6_addrstr_loc[INET6_ADDRSTRLEN+1]

Definition at line 79 of file tp_over_udp.cpp.

Referenced by protlib::TPoverUDP::listener_thread().


Generated on Fri Aug 14 23:38:34 2009 for Ariba by  doxygen 1.5.8