#include <connection.h>
Inheritance diagram for connection:


Public Types | |
| enum | states { DISCONNECTED, AWAITING_A_CLIENT, REACHING_SERVER, WHO_IS_CLIENT, HELLO_TO_SERVER, CONNECTED, SENDING_CLOSE, SENDING_CLOSE_ACK, DONE_CLOSING } |
Public Member Functions | |
| connection () | |
| ~connection () | |
| connection_id | conn_id () const |
| void | conn_id (const connection_id &new_id) |
| istring | catalogable_name () const |
| must be overridden by every catalogable object. | |
| istring | text_form () const |
| Provides a text view of all the important info owned by this object. | |
| bool | connected () const |
| time_stamp | connected_since () const |
| states | state () const |
| void | state (states to_set) |
| time_stamp | last_state_change () const |
Static Public Member Functions | |
| static const char * | connection_state_name (states state) |
Public Attributes | |
| transport_id | local_transport_id |
| transport_id | real_transport_id |
| network_address | remote_host |
| int | low_level [2] |
| transport_id | remote_transport_id |
| connection_id | remote_connection_id |
| bool | alive |
| heartbeat | liveness |
Definition at line 32 of file connection.h.
| enum connection::states |
| DISCONNECTED | |
| AWAITING_A_CLIENT | |
| REACHING_SERVER | |
| WHO_IS_CLIENT | |
| HELLO_TO_SERVER | |
| CONNECTED | |
| SENDING_CLOSE | |
| SENDING_CLOSE_ACK | |
| DONE_CLOSING |
Definition at line 39 of file connection.h.
| connection::connection | ( | ) |
| connection::~connection | ( | ) | [inline] |
Definition at line 36 of file connection.h.
| const char * connection::connection_state_name | ( | states | state | ) | [static] |
Definition at line 51 of file connection.cpp.
References AWAITING_A_CLIENT, CONNECTED, DISCONNECTED, DONE_CLOSING, HELLO_TO_SERVER, REACHING_SERVER, SENDING_CLOSE, SENDING_CLOSE_ACK, and WHO_IS_CLIENT.
Referenced by text_form().
| connection_id connection::conn_id | ( | ) | const [inline] |
Definition at line 82 of file connection.h.
Referenced by connection_table::add(), catalogable_name(), connection_table::clear_dead(), connection_table::find_destination(), connection_table::find_dupe(), connection_table::find_linked(), connection_table::find_low_level(), connection_table::find_state(), text_form(), and connection_table::update().
| void connection::conn_id | ( | const connection_id & | new_id | ) |
Definition at line 45 of file connection.cpp.
References nodes::catalogable::assign_unique_id(), and unique_id< uniquifier >::raw_id().
| istring connection::catalogable_name | ( | ) | const [virtual] |
must be overridden by every catalogable object.
Implements nodes::catalogable.
Definition at line 48 of file connection.cpp.
References conn_id(), and istring::SPRINTF.
| istring connection::text_form | ( | ) | const [virtual] |
Provides a text view of all the important info owned by this object.
It is understood that there could be a large amount of information and that this function might take a relatively long time to complete. The information can be provided in multiple lines if desired (it is good to use log_base::platform_ending() for the line breaks to help to ensure that the text is formatted appropriately). the default is quite lame and should be overridden.
Reimplemented from object_base.
Definition at line 80 of file connection.cpp.
References alive, conn_id(), connected(), connection_state_name(), local_transport_id, low_level, PRIMARY_ID, unique_id< uniquifier >::raw_id(), real_transport_id, remote_host, remote_transport_id, istring::s(), SECONDARY_ID, istring::SPRINTF, state(), network_address::text_form(), and time_stamp::text_form().
Referenced by connection_table::show_connections().
| bool connection::connected | ( | ) | const |
Definition at line 95 of file connection.cpp.
References CONNECTED, DISCONNECTED, DONE_CLOSING, HELLO_TO_SERVER, SENDING_CLOSE, SENDING_CLOSE_ACK, state(), and WHO_IS_CLIENT.
Referenced by connection_table::connected(), connection_table::get_low_level_id(), text_form(), and connection_table::transport_connected().
| time_stamp connection::connected_since | ( | ) | const |
Definition at line 78 of file connection.cpp.
| connection::states connection::state | ( | ) | const |
Definition at line 43 of file connection.cpp.
Referenced by connection_table::add(), connected(), connection_table::count_users(), connection_table::find_state(), connection_table::get_conn_state(), connection_table::set_conn_state(), connection_table::set_conn_states(), and text_form().
| void connection::state | ( | states | to_set | ) |
| time_stamp connection::last_state_change | ( | ) | const |
Definition at line 41 of file connection.cpp.
Definition at line 63 of file connection.h.
Referenced by connection_table::add(), connection_table::count_users(), connection_table::find_linked(), connection_table::owns_connection(), text_form(), and connection_table::transport_connected().
Definition at line 64 of file connection.h.
Referenced by connection_table::count_users(), connection_table::find_destination(), connection_table::find_dupe(), connection_table::find_linked(), connection_table::find_live_reals(), connection_table::find_related_conns(), connection_table::find_state(), connection_table::get_low_level_id(), connection_table::set_conn_states(), text_form(), and connection_table::transport_connected().
Definition at line 67 of file connection.h.
Referenced by connection_table::find_destination(), connection_table::find_dupe(), connection_table::find_low_level(), and text_form().
| int connection::low_level[2] |
Definition at line 68 of file connection.h.
Referenced by connection(), connection_table::count_users(), connection_table::find_dupe(), connection_table::find_low_level(), connection_table::find_related_conns(), connection_table::find_state(), connection_table::get_low_level_id(), connection_table::set_conn_state(), and text_form().
Definition at line 73 of file connection.h.
Referenced by connection_table::find_dupe(), connection_table::find_linked(), and text_form().
Definition at line 74 of file connection.h.
| bool connection::alive |
Definition at line 77 of file connection.h.
Referenced by connection_table::add(), connection_table::clear_dead(), connection_table::count_users(), connection_table::find(), connection_table::find_destination(), connection_table::find_dupe(), connection_table::find_linked(), connection_table::find_live_reals(), connection_table::find_low_level(), connection_table::find_related_conns(), connection_table::find_state(), connection_table::get_conn_state(), connection_table::get_low_level_id(), connection_table::live(), connection_table::set_conn_state(), connection_table::show_connections(), text_form(), connection_table::transport_connected(), and connection_table::zap().
Definition at line 78 of file connection.h.
Referenced by connection_table::add(), connection_table::clear_dead(), connection_table::liveness(), connection_table::record_request(), connection_table::reset_time(), connection_table::set_liveness(), and connection_table::zap().
1.5.1