#include <connectionReader.h>
Inheritance diagram for ConnectionReader:
Protected Member Functions | |
virtual void | receive_datagram (const NetDatagram &datagram)=0 |
void | shutdown () |
void | clear_manager () |
void | finish_socket (SocketInfo *sinfo) |
virtual void | process_incoming_data (SocketInfo *sinfo) |
virtual void | process_incoming_udp_data (SocketInfo *sinfo) |
virtual void | process_incoming_tcp_data (SocketInfo *sinfo) |
virtual void | process_raw_incoming_udp_data (SocketInfo *sinfo) |
virtual void | process_raw_incoming_tcp_data (SocketInfo *sinfo) |
Protected Attributes | |
ConnectionManager * | _manager |
Private Types | |
typedef pvector< PRThread * > | Threads |
typedef pvector< PRPollDesc > | Poll |
typedef pvector< SocketInfo * > | Sockets |
Private Member Functions | |
virtual | ~ConnectionReader () |
bool | add_connection (const PT(Connection)&connection) |
bool | remove_connection (const PT(Connection)&connection) |
bool | is_connection_ok (const PT(Connection)&connection) |
void | poll () |
ConnectionManager * | get_manager () const |
bool | is_polling () const |
int | get_num_threads () const |
void | set_raw_mode (bool mode) |
bool | get_raw_mode () const |
void | thread_run () |
SocketInfo * | get_next_available_socket (PRIntervalTime timeout, PRInt32 current_thread_index) |
void | rebuild_poll_list () |
Static Private Member Functions | |
void | thread_start (void *data) |
Private Attributes | |
PUBLISHED | __pad0__: ConnectionReader(ConnectionManager *manager |
PUBLISHED int | num_threads |
bool | _raw_mode |
bool | _shutdown |
Threads | _threads |
PRLock * | _startup_mutex |
bool | _polling |
Poll | _poll |
Sockets | _polled_sockets |
int | _next_index |
int | _num_results |
PRLock * | _select_mutex |
PRInt32 | _currently_polling_thread |
Sockets | _sockets |
Sockets | _removed_sockets |
bool | _reexamine_sockets |
PRLock * | _sockets_mutex |
Friends | |
class | ConnectionManager |
|
Definition at line 135 of file connectionReader.h. |
|
Definition at line 136 of file connectionReader.h. Referenced by rebuild_poll_list(). |
|
Definition at line 128 of file connectionReader.h. |
|
Definition at line 128 of file connectionReader.cxx. References ConnectionReader::SocketInfo::_busy, _manager, _removed_sockets, _select_mutex, _sockets, _sockets_mutex, _startup_mutex, NULL, ConnectionManager::remove_reader(), and shutdown(). |
|
Definition at line 177 of file connectionReader.cxx. References _reexamine_sockets, _sockets, _sockets_mutex, and NULL. |
|
Definition at line 392 of file connectionReader.cxx. |
|
Definition at line 403 of file connectionReader.cxx. References ConnectionReader::SocketInfo::_busy, and _reexamine_sockets. Referenced by ConnectionListener::process_incoming_data(), process_incoming_tcp_data(), process_incoming_udp_data(), process_raw_incoming_tcp_data(), and process_raw_incoming_udp_data(). |
|
Definition at line 299 of file connectionReader.cxx. References _manager. |
|
Definition at line 835 of file connectionReader.cxx. References ConnectionReader::SocketInfo::_busy, _currently_polling_thread, ConnectionReader::SocketInfo::_error, _manager, _next_index, _num_results, _poll, _polled_sockets, _reexamine_sockets, _select_mutex, _shutdown, ConnectionManager::connection_reset(), max_timeout_ms, NULL, pprerror(), and rebuild_poll_list(). Referenced by poll(), and thread_run(). |
|
Definition at line 321 of file connectionReader.cxx. References _threads. |
|
Definition at line 345 of file connectionReader.cxx. References _raw_mode. |
|
Definition at line 245 of file connectionReader.cxx. References ConnectionReader::SocketInfo::_error, _sockets, and _sockets_mutex. |
|
Definition at line 310 of file connectionReader.cxx. References _polling. |
|
Definition at line 281 of file connectionReader.cxx. References _polling, get_next_available_socket(), NULL, and process_incoming_data(). Referenced by QueuedConnectionReader::data_available(), and QueuedConnectionListener::new_connection_available(). |
|
Reimplemented in ConnectionListener. Definition at line 439 of file connectionReader.cxx. References ConnectionReader::SocketInfo::is_udp(), process_incoming_tcp_data(), process_incoming_udp_data(), process_raw_incoming_tcp_data(), and process_raw_incoming_udp_data(). Referenced by poll(), and thread_run(). |
|
Definition at line 532 of file connectionReader.cxx. References _manager, _shutdown, buffer, ConnectionManager::connection_reset(), finish_socket(), DatagramTCPHeader::get_datagram_size(), ConnectionReader::SocketInfo::get_socket(), NULL, pprerror(), read_buffer_size, receive_datagram(), NetDatagram::set_address(), NetDatagram::set_connection(), and DatagramTCPHeader::verify_datagram(). Referenced by process_incoming_data(). |
|
Definition at line 461 of file connectionReader.cxx. References _manager, buffer, ConnectionManager::connection_reset(), finish_socket(), ConnectionReader::SocketInfo::get_socket(), NULL, pprerror(), read_buffer_size, receive_datagram(), NetDatagram::set_address(), NetDatagram::set_connection(), and DatagramUDPHeader::verify_datagram(). Referenced by process_incoming_data(). |
|
Definition at line 727 of file connectionReader.cxx. References _manager, buffer, ConnectionManager::connection_reset(), finish_socket(), ConnectionReader::SocketInfo::get_socket(), NULL, pprerror(), read_buffer_size, receive_datagram(), NetDatagram::set_address(), and NetDatagram::set_connection(). Referenced by process_incoming_data(). |
|
Definition at line 675 of file connectionReader.cxx. References _manager, buffer, ConnectionManager::connection_reset(), finish_socket(), ConnectionReader::SocketInfo::get_socket(), NULL, pprerror(), read_buffer_size, receive_datagram(), NetDatagram::set_address(), and NetDatagram::set_connection(). Referenced by process_incoming_data(). |
|
Definition at line 952 of file connectionReader.cxx. References ConnectionReader::SocketInfo::_busy, ConnectionReader::SocketInfo::_error, _poll, _polled_sockets, _removed_sockets, _sockets, _sockets_mutex, ConnectionReader::SocketInfo::get_socket(), and Sockets. Referenced by get_next_available_socket(). |
|
Implemented in ConnectionListener, QueuedConnectionReader, and RecentConnectionReader. Referenced by process_incoming_tcp_data(), process_incoming_udp_data(), process_raw_incoming_tcp_data(), and process_raw_incoming_udp_data(). |
|
Definition at line 211 of file connectionReader.cxx. References _reexamine_sockets, _removed_sockets, _sockets, and _sockets_mutex. |
|
Definition at line 334 of file connectionReader.cxx. |
|
Definition at line 356 of file connectionReader.cxx. References _shutdown, _threads, and pprerror(). Referenced by ~ConnectionReader(), QueuedConnectionListener::~QueuedConnectionListener(), QueuedConnectionReader::~QueuedConnectionReader(), and RecentConnectionReader::~RecentConnectionReader(). |
|
Definition at line 797 of file connectionReader.cxx. References _polling, _shutdown, _startup_mutex, _threads, get_next_available_socket(), NULL, and process_incoming_data(). |
|
Definition at line 786 of file connectionReader.cxx. References data. |
|
Definition at line 163 of file connectionReader.h. |
|
Reimplemented in ConnectionListener, QueuedConnectionListener, QueuedConnectionReader, and RecentConnectionReader. Definition at line 72 of file connectionReader.h. |
|
Definition at line 148 of file connectionReader.h. Referenced by get_next_available_socket(). |
|
Definition at line 122 of file connectionReader.h. Referenced by clear_manager(), get_manager(), get_next_available_socket(), ConnectionListener::process_incoming_data(), process_incoming_tcp_data(), process_incoming_udp_data(), process_raw_incoming_tcp_data(), process_raw_incoming_udp_data(), and ~ConnectionReader(). |
|
Definition at line 139 of file connectionReader.h. Referenced by get_next_available_socket(). |
|
Definition at line 140 of file connectionReader.h. Referenced by get_next_available_socket(). |
|
Definition at line 137 of file connectionReader.h. Referenced by get_next_available_socket(), and rebuild_poll_list(). |
|
Definition at line 138 of file connectionReader.h. Referenced by get_next_available_socket(), and rebuild_poll_list(). |
|
Definition at line 131 of file connectionReader.h. Referenced by is_polling(), poll(), and thread_run(). |
|
Definition at line 125 of file connectionReader.h. Referenced by get_raw_mode(), and set_raw_mode(). |
|
Definition at line 158 of file connectionReader.h. Referenced by add_connection(), finish_socket(), get_next_available_socket(), and remove_connection(). |
|
Definition at line 155 of file connectionReader.h. Referenced by rebuild_poll_list(), remove_connection(), and ~ConnectionReader(). |
|
Definition at line 143 of file connectionReader.h. Referenced by get_next_available_socket(), and ~ConnectionReader(). |
|
Definition at line 126 of file connectionReader.h. Referenced by get_next_available_socket(), process_incoming_tcp_data(), shutdown(), and thread_run(). |
|
Definition at line 152 of file connectionReader.h. Referenced by add_connection(), is_connection_ok(), rebuild_poll_list(), remove_connection(), and ~ConnectionReader(). |
|
Definition at line 160 of file connectionReader.h. Referenced by add_connection(), is_connection_ok(), rebuild_poll_list(), remove_connection(), and ~ConnectionReader(). |
|
Definition at line 130 of file connectionReader.h. Referenced by thread_run(), and ~ConnectionReader(). |
|
Definition at line 129 of file connectionReader.h. Referenced by get_num_threads(), shutdown(), and thread_run(). |
|
Reimplemented in ConnectionListener, QueuedConnectionListener, and QueuedConnectionReader. Definition at line 72 of file connectionReader.h. |