#include <source/ariba/utility/transport/tcpip/protlib/tp_over_tcp.h>
Inherits protlib::TP, and protlib::Thread.
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 | |
AssocData * | get_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 | |
FastQueue * | msgqueue |
message queue | |
bool | debug_pdu |
This class implements the TP interface using TCP.
Definition at line 99 of file tp_over_tcp.h.
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.
typedef hash_map<appladdress, FastQueue*> protlib::TPoverTCP::sender_thread_queuemap_t [private] |
protlib::TPoverTCP::TPoverTCP | ( | const TPoverTCPParam & | p | ) | [inline] |
constructor
< init done;
Definition at line 115 of file tp_over_tcp.h.
References protlib::TP::init.
bool protlib::TPoverTCP::already_aborted [private] |
ConnectionMap protlib::TPoverTCP::connmap [private] |
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().
bool protlib::TPoverTCP::debug_pdu [private] |
FastQueue* protlib::TPoverTCP::msgqueue [private] |
Definition at line 205 of file tp_over_tcp.h.
Referenced by cleanup_receiver_thread(), create_new_receiver_thread(), stop_receiver_thread(), and terminate_all_threads().
const TPoverTCPParam protlib::TPoverTCP::tpparam [private] |
parameters for main TPoverTCP thread
Definition at line 212 of file tp_over_tcp.h.
Referenced by cleanup_receiver_thread(), create_new_receiver_thread(), create_new_sender_thread(), get_connection_to(), main_loop(), master_listener_thread(), receiver_thread(), send(), sender_thread(), stop_receiver_thread(), tcpsend(), terminate(), terminate_all_threads(), terminate_sender_thread(), and ~TPoverTCP().