protlib::TPoverTCP Class Reference

TP over TCP. More...

#include <source/ariba/utility/transport/tcpip/protlib/tp_over_tcp.h>

Inherits protlib::TP, and protlib::Thread.

Collaboration diagram for protlib::TPoverTCP:

Collaboration graph
[legend]

List of all members.

Classes

struct  receiver_thread_arg
class  receiver_thread_start_arg_t
class  sender_thread_start_arg_t

Public Types

typedef struct
protlib::TPoverTCP::receiver_thread_arg 
receiver_thread_arg_t

Public Member Functions

virtual void send (NetMsg *msg, const address &addr, bool use_existing_connection)
 sends a network message, spawns receiver thread if necessary
virtual void terminate (const address &addr)
virtual void main_loop (uint32 nr)
 main loop
 TPoverTCP (const TPoverTCPParam &p)
 constructor
virtual ~TPoverTCP ()
 virtual destructor

Private Types

typedef hash_map< pthread_t,
receiver_thread_arg_t * > 
recv_thread_argmap_t
 store per receiver thread arguments, e.g. for signaling termination
typedef hash_map< appladdress,
FastQueue * > 
sender_thread_queuemap_t
 store sender thread related information

Private Member Functions

AssocDataget_connection_to (const appladdress &addr)
 returns already existing connection or establishes a new one
void sender_thread (void *argp)
 receiver thread for a specific socket
void receiver_thread (void *argp)
 receiver thread for a specific socket
void tcpsend (NetMsg *msg, appladdress *addr)
 send a message to the network via TCP
void master_listener_thread ()
 main listener thread procedure
void create_new_sender_thread (FastQueue *senderqueue)
void create_new_receiver_thread (AssocData *peer_assoc)
void stop_receiver_thread (AssocData *peer_assoc)
 terminates particular thread
void cleanup_receiver_thread (AssocData *peer_assoc)
 cleans up thread management structures
void terminate_sender_thread (const AssocData *assoc)
 terminates a sender thread
void terminate_all_threads ()
 terminates all active receiver or sender threads

Static Private Member Functions

static void * sender_thread_starter (void *argp)
 sender thread starter for a specific socket
static void * receiver_thread_starter (void *argp)
 receiver thread starter for a specific socket
static void * master_listener_thread_starter (void *argp)
 a static starter method to invoke the actual main listener

Private Attributes

ConnectionMap connmap
 ConnectionMap instance for keeping track of all existing connections.
recv_thread_argmap_t recv_thread_argmap
sender_thread_queuemap_t senderthread_queuemap
const TPoverTCPParam tpparam
 parameters for main TPoverTCP thread
bool already_aborted
 did we already abort at thread shutdown
FastQueuemsgqueue
 message queue
bool debug_pdu


Detailed Description

TP over TCP.

This class implements the TP interface using TCP.

Definition at line 99 of file tp_over_tcp.h.


Member Typedef Documentation

typedef hash_map<pthread_t, receiver_thread_arg_t*> protlib::TPoverTCP::recv_thread_argmap_t [private]

store per receiver thread arguments, e.g. for signaling termination

Definition at line 204 of file tp_over_tcp.h.

store sender thread related information

Definition at line 208 of file tp_over_tcp.h.


Constructor & Destructor Documentation

protlib::TPoverTCP::TPoverTCP ( const TPoverTCPParam p  )  [inline]

constructor

< init done;

Definition at line 115 of file tp_over_tcp.h.

References protlib::TP::init.


Member Data Documentation

did we already abort at thread shutdown

Definition at line 215 of file tp_over_tcp.h.

ConnectionMap instance for keeping track of all existing connections.

Definition at line 201 of file tp_over_tcp.h.

Referenced by cleanup_receiver_thread(), get_connection_to(), master_listener_thread(), send(), terminate(), and terminate_all_threads().

Definition at line 219 of file tp_over_tcp.h.

Referenced by receiver_thread(), and tcpsend().

message queue

Definition at line 217 of file tp_over_tcp.h.

Definition at line 209 of file tp_over_tcp.h.

Referenced by send(), and terminate_sender_thread().


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

Generated on Fri Aug 14 23:39:56 2009 for Ariba by  doxygen 1.5.8