CPPSERV


Home Projects Jobs Clientele Contact
CPPSERV Documentation Download TODO Mailing lists Bug tracker News RSS Feed Browse source

container::RequestListener Class Reference

#include <requestlistener.h>

Collaboration diagram for container::RequestListener:

List of all members.


Classes

class  Acceptor
class  TCPAcceptor
class  UnixAcceptor
class  UnknownProtocolError

Public Types

enum  { MAX_BACKLOG = 512, PORT = 9004 }

Public Member Functions

 RequestListener (sptk::CThreadPool &)
 ~RequestListener ()
void acceptRequests ()
void addAcceptor (container::RequestListener::Acceptor *)

Private Types

typedef std::map< int, Acceptor * > acceptormap_t

Private Attributes

acceptormap_t m_listeners
sptk::CWaiter m_listenerLock
fd_set m_accept_fds
int m_maxfd
sptk::CThreadPool & m_pool

Friends

class container::AcceptConnection
class Connection

Detailed Description

Receives request from network, spawns separate thread, creates request object, instantiates (if needed) servlet, etc.

Author:
Ilya A. Volynets-Evenbakh

Definition at line 40 of file requestlistener.h.


Member Typedef Documentation

typedef std::map<int, Acceptor*> container::RequestListener::acceptormap_t [private]

Definition at line 85 of file requestlistener.h.


Member Enumeration Documentation

anonymous enum

Enumerator:
MAX_BACKLOG 
PORT 

Definition at line 95 of file requestlistener.h.


Constructor & Destructor Documentation

container::RequestListener::RequestListener ( sptk::CThreadPool &  pool  ) 

Definition at line 41 of file requestlistener.cpp.

References m_accept_fds.

container::RequestListener::~RequestListener (  ) 

Definition at line 49 of file requestlistener.cpp.


Member Function Documentation

void container::RequestListener::acceptRequests (  ) 

Accepts and queues requests into m_pool for processing. If interrupted bu signal, presumes it's time to say bye bye

Definition at line 81 of file requestlistener.cpp.

References m_accept_fds, m_listenerLock, m_listeners, m_maxfd, and m_pool.

Referenced by container::CServDemon::run().


Friends And Related Function Documentation

friend class Connection [friend]

friend class container::AcceptConnection [friend]

Definition at line 80 of file requestlistener.h.


Member Data Documentation

Definition at line 88 of file requestlistener.h.

Referenced by acceptRequests(), addAcceptor(), and RequestListener().

Definition at line 87 of file requestlistener.h.

Referenced by acceptRequests(), and addAcceptor().

Definition at line 89 of file requestlistener.h.

Referenced by acceptRequests(), and addAcceptor().

sptk::CThreadPool& container::RequestListener::m_pool [private]

Definition at line 90 of file requestlistener.h.

Referenced by acceptRequests().


The documentation for this class was generated from the following files:

SourceForge.net Logo