#include <requestlistener.h>
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 |
Definition at line 40 of file requestlistener.h.
typedef std::map<int, Acceptor*> container::RequestListener::acceptormap_t [private] |
Definition at line 85 of file requestlistener.h.
anonymous enum |
container::RequestListener::RequestListener | ( | sptk::CThreadPool & | pool | ) |
container::RequestListener::~RequestListener | ( | ) |
Definition at line 49 of file requestlistener.cpp.
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().
void container::RequestListener::addAcceptor | ( | container::RequestListener::Acceptor * | acc | ) |
Definition at line 210 of file requestlistener.cpp.
References m_accept_fds, m_listenerLock, m_listeners, m_maxfd, and container::RequestListener::RequestListener::Acceptor::m_sock.
Referenced by container::serverconfig::DoAccept::operator()().
friend class Connection [friend] |
Definition at line 104 of file requestlistener.h.
Referenced by container::RequestListener::RequestListener::Acceptor::accept().
friend class container::AcceptConnection [friend] |
Definition at line 80 of file requestlistener.h.
fd_set container::RequestListener::m_accept_fds [private] |
Definition at line 88 of file requestlistener.h.
Referenced by acceptRequests(), addAcceptor(), and RequestListener().
sptk::CWaiter container::RequestListener::m_listenerLock [private] |
int container::RequestListener::m_maxfd [private] |
sptk::CThreadPool& container::RequestListener::m_pool [private] |