Poller Class Reference

#include <Poller.h>

Inherits Object.

Inherited by Core.

Inheritance diagram for Poller:

Inheritance graph
[legend]
Collaboration diagram for Poller:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Poller ()
virtual ~Poller ()
int add (Socket *sock)
int remove (Socket *sock)
int poll ()

Private Types

typedef set< Socket * > SocketList

Private Attributes

SocketList _sockets
int _maxSocket
fd_set _allSet
timeval _tv

Detailed Description

Definition at line 28 of file Poller.h.


Member Typedef Documentation

typedef set<Socket *> Poller::SocketList [private]

Definition at line 44 of file Poller.h.


Constructor & Destructor Documentation

Poller::Poller (  ) 

Definition at line 23 of file Poller.cpp.

References _allSet, _maxSocket, _tv, DEBUG, and POLLER_SESSION_TIMEOUT.

Poller::~Poller (  )  [virtual]

Definition at line 35 of file Poller.cpp.


Member Function Documentation

int Poller::add ( Socket sock  ) 

Definition at line 39 of file Poller.cpp.

References _allSet, _maxSocket, _sockets, DEBUG, ERROR, MSG_NULL_POINTER, OK, and Socket::socket().

int Poller::remove ( Socket sock  ) 

Definition at line 58 of file Poller.cpp.

References _allSet, _sockets, DEBUG, ERROR, MSG_NULL_POINTER, MSG_POLLER_UNKNOWN_CONNECTION, OK, and Socket::socket().

Referenced by poll().

int Poller::poll (  ) 

Definition at line 79 of file Poller.cpp.

References _allSet, _maxSocket, Socket::_socket, _sockets, TcpConnection::_status, _tv, TcpServer::accept(), DEBUG, ERROR, ERROR_BACKTRACE(), FAILED(), Connection::isAlive(), MSG_NO_INTERFACE, MSG_POLLER_SELECT, OK, remove(), TcpConnection::setConnected(), Connection::setDataReady(), Connection::setDead(), TCP_CONNECTION_STATUS_DISCONNECTED, and TCP_SERVER.

Referenced by Core::dispatch().


Member Data Documentation

SocketList Poller::_sockets [private]

Definition at line 46 of file Poller.h.

Referenced by add(), poll(), and remove().

int Poller::_maxSocket [private]

Definition at line 48 of file Poller.h.

Referenced by add(), poll(), and Poller().

fd_set Poller::_allSet [private]

Definition at line 49 of file Poller.h.

Referenced by add(), poll(), Poller(), and remove().

struct timeval Poller::_tv [private]

Definition at line 50 of file Poller.h.

Referenced by poll(), and Poller().


The documentation for this class was generated from the following files:
Generated on Thu Sep 6 20:13:46 2007 for Pylon Application Platform by  doxygen 1.5.1