#include <source/ariba/utility/transport/tcpip/protlib/connectionmap.h>
Public Types | |
typedef const_ass2data_it_t | const_it_t |
connection map iterator | |
Public Member Functions | |
bool | erase (AssocData *assoc) |
Erase the AssocData-element. | |
size_t | get_size () const |
get number of records | |
const_it_t | begin () const |
const_it_t | end () const |
bool | insert (AssocData *assoc) |
Insert a new AssocData element into the ConnectionMap. | |
AssocData * | lookup (socketfd_t socketfd) const |
Search for existing connections to this specific socket. | |
AssocData * | lookup (associd_t associd) const |
Search for existing connections to this specific assoc id. | |
AssocData * | lookup (const appladdress &addr) const |
Search for existing connections to this address. | |
bool | erase (socketfd_t socketfd) |
Erase the AssocData-element associated with this socket. | |
bool | erase (associd_t associd) |
Erase the AssocData-element associated with this socket. | |
void | clear () |
clear all | |
Private Types | |
typedef hash_map< socketfd_t,AssocData * > | ass2data_t |
typedef ass2data_t::const_iterator | const_ass2data_it_t |
typedef hash_map< appladdress, AssocData * > | addr2data_t |
typedef addr2data_t::const_iterator | const_addr2data_it_t |
Private Attributes | |
ass2data_t | ass2data |
map: socket fd to association data | |
addr2data_t | addr2data |
map: (application) address to association data |
Definition at line 42 of file connectionmap.h.
typedef hash_map<appladdress,AssocData*> protlib::ConnectionMap::addr2data_t [private] |
Definition at line 69 of file connectionmap.h.
typedef hash_map<socketfd_t ,AssocData*> protlib::ConnectionMap::ass2data_t [private] |
Definition at line 67 of file connectionmap.h.
typedef addr2data_t::const_iterator protlib::ConnectionMap::const_addr2data_it_t [private] |
Definition at line 70 of file connectionmap.h.
typedef ass2data_t::const_iterator protlib::ConnectionMap::const_ass2data_it_t [private] |
Definition at line 68 of file connectionmap.h.
ConnectionMap::const_it_t protlib::ConnectionMap::begin | ( | ) | const [inline] |
void protlib::ConnectionMap::clear | ( | ) |
ConnectionMap::const_it_t protlib::ConnectionMap::end | ( | ) | const [inline] |
bool protlib::ConnectionMap::erase | ( | AssocData * | assoc | ) | [inline] |
Erase the AssocData-element.
Definition at line 98 of file connectionmap.h.
References erase(), and protlib::AssocData::socketfd.
bool protlib::ConnectionMap::erase | ( | associd_t | associd | ) |
Erase the AssocData-element associated with this socket.
could be deleted
associd | association id |
Definition at line 128 of file connectionmap.cpp.
References addr2data, ass2data, protlib::AssocData::assoc, lookup(), and protlib::AssocData::peer.
bool protlib::ConnectionMap::erase | ( | socketfd_t | socketfd | ) |
Erase the AssocData-element associated with this socket.
socketfd | socket file descriptor |
Definition at line 112 of file connectionmap.cpp.
References addr2data, ass2data, lookup(), protlib::AssocData::peer, and protlib::AssocData::socketfd.
Referenced by protlib::TPoverTCP::cleanup_receiver_thread(), erase(), and protlib::TPoverTCP::terminate_all_threads().
size_t protlib::ConnectionMap::get_size | ( | ) | const [inline] |
bool protlib::ConnectionMap::insert | ( | AssocData * | assoc | ) |
Insert a new AssocData element into the ConnectionMap.
Definition at line 56 of file connectionmap.cpp.
References addr2data, ass2data, protlib::AssocData::assoc, protlib::log::ERROR_LOG, Log, protlib::log::LOG_NORMAL, lookup(), protlib::AssocData::peer, and protlib::AssocData::socketfd.
Referenced by protlib::TPoverTCP::get_connection_to(), and protlib::TPoverTCP::master_listener_thread().
AssocData * protlib::ConnectionMap::lookup | ( | const appladdress & | addr | ) | const |
Search for existing connections to this address.
addr | IP-adress + port |
Definition at line 101 of file connectionmap.cpp.
References addr2data.
Search for existing connections to this specific assoc id.
Definition at line 90 of file connectionmap.cpp.
References ass2data.
AssocData * protlib::ConnectionMap::lookup | ( | socketfd_t | socketfd | ) | const |
Search for existing connections to this specific socket.
socketfd | socket file descriptor |
Definition at line 83 of file connectionmap.cpp.
References ass2data.
Referenced by erase(), protlib::TPoverTCP::get_connection_to(), insert(), protlib::TPoverTCP::send(), and protlib::TPoverTCP::terminate().
addr2data_t protlib::ConnectionMap::addr2data [private] |
ass2data_t protlib::ConnectionMap::ass2data [private] |
map: socket fd to association data
Definition at line 73 of file connectionmap.h.
Referenced by begin(), clear(), end(), erase(), get_size(), insert(), and lookup().