Mixe for Privacy and Anonymity in the Internet
|
#include <CASocketGroupEpoll.hpp>
Public Member Functions | |
CASocketGroupEpoll (bool bWrite) | |
~CASocketGroupEpoll () | |
SINT32 | setPoolForWrite (bool bWrite) |
SINT32 | add (CASocket &s) |
Adds the socket s to the socket group. More... | |
SINT32 | add (CAMuxSocket &s) |
Adds the socket s to the socket group. More... | |
SINT32 | add (CASocket &s, void *datapointer) |
SINT32 | add (CAMuxSocket &s, void *datapointer) |
Adds the socket s to the socket group. More... | |
SINT32 | remove (CASocket &s) |
SINT32 | remove (CAMuxSocket &s) |
SINT32 | select () |
SINT32 | select (UINT32 time_ms) |
Waits for events on the sockets. More... | |
bool | isSignaled (CASocket &s) |
bool | isSignaled (CASocket *ps) |
bool | isSignaled (CAMuxSocket &s) |
bool | isSignaled (void *datapointer) |
void * | getFirstSignaledSocketData () |
void * | getNextSignaledSocketData () |
Private Attributes | |
EPOLL_HANDLE | m_hEPFD |
struct epoll_event * | m_pEvents |
struct epoll_event * | m_pEpollEvent |
SINT32 | m_iNumOfReadyFD |
SINT32 | m_iAktSignaledSocket |
CAMutex * | m_pcsFD_SET |
Definition at line 42 of file CASocketGroupEpoll.hpp.
CASocketGroupEpoll::CASocketGroupEpoll | ( | bool | bWrite | ) |
Definition at line 31 of file CASocketGroupEpoll.cpp.
References m_hEPFD, m_pcsFD_SET, m_pEpollEvent, m_pEvents, MAX_POLLFD, and setPoolForWrite().
CASocketGroupEpoll::~CASocketGroupEpoll | ( | ) |
Definition at line 41 of file CASocketGroupEpoll.cpp.
References epoll_close, m_hEPFD, m_pcsFD_SET, m_pEpollEvent, and m_pEvents.
|
inline |
Adds the socket s to the socket group.
Definition at line 56 of file CASocketGroupEpoll.hpp.
References add().
|
inline |
Adds the socket s to the socket group.
Additional one can set a parameter datapointer, which is assoziated with the socket s
Definition at line 95 of file CASocketGroupEpoll.hpp.
References add(), and CAMuxSocket::getCASocket().
Adds the socket s to the socket group.
Definition at line 50 of file CASocketGroupEpoll.hpp.
Referenced by add(), CALocalProxy::loop(), CAFirstMixA::loop(), CALastMixA::loop(), and CAFirstMixB::loop().
Definition at line 65 of file CASocketGroupEpoll.hpp.
References E_SUCCESS, E_UNKNOWN, GETERROR, CASocket::getSocket(), CAMutex::lock(), m_hEPFD, m_pcsFD_SET, m_pEpollEvent, CAMsg::printMsg(), SOCKET, and CAMutex::unlock().
|
inline |
Definition at line 202 of file CASocketGroupEpoll.hpp.
References m_iAktSignaledSocket, m_iNumOfReadyFD, and m_pEvents.
Referenced by CAFirstMixA::loop(), CALastMixA::loop(), CAFirstMixB::loop(), CALastMixB::loop(), and CAFirstMixA::sendToUsers().
|
inline |
Definition at line 211 of file CASocketGroupEpoll.hpp.
References m_iAktSignaledSocket, m_iNumOfReadyFD, and m_pEvents.
Referenced by CAFirstMixA::loop(), CALastMixA::loop(), CAFirstMixB::loop(), CALastMixB::loop(), and CAFirstMixA::sendToUsers().
|
inline |
Definition at line 179 of file CASocketGroupEpoll.hpp.
References data, CAMuxSocket::getSocket(), m_iNumOfReadyFD, and m_pEvents.
|
inline |
Definition at line 155 of file CASocketGroupEpoll.hpp.
References data, CASocket::getSocket(), m_iNumOfReadyFD, and m_pEvents.
Referenced by CAChain::isSignaledInSocketGroup(), CALocalProxy::loop(), CAFirstMixA::loop(), CALastMixA::loop(), CAFirstMixB::loop(), and CAFirstMixA::sendToUsers().
|
inline |
Definition at line 167 of file CASocketGroupEpoll.hpp.
References data, CASocket::getSocket(), m_iNumOfReadyFD, and m_pEvents.
|
inline |
Definition at line 191 of file CASocketGroupEpoll.hpp.
References data, m_iNumOfReadyFD, and m_pEvents.
|
inline |
Definition at line 111 of file CASocketGroupEpoll.hpp.
References CAMuxSocket::getCASocket(), and remove().
Definition at line 100 of file CASocketGroupEpoll.hpp.
References ASSERT, E_SUCCESS, E_UNKNOWN, CASocket::getSocket(), CAMutex::lock(), m_hEPFD, m_pcsFD_SET, m_pEpollEvent, and CAMutex::unlock().
Referenced by CAFirstMixA::closeConnection(), CALocalProxy::loop(), CALastMixA::loop(), CAFirstMixB::loop(), remove(), and CAChain::removeFromAllSocketGroupsInternal().
|
inline |
Definition at line 116 of file CASocketGroupEpoll.hpp.
References E_UNKNOWN, CAMutex::lock(), m_hEPFD, m_iNumOfReadyFD, m_pcsFD_SET, m_pEvents, MAX_POLLFD, and CAMutex::unlock().
Referenced by CALocalProxy::loop(), CAFirstMixA::loop(), CALastMixA::loop(), CAFirstMixB::loop(), CALastMixB::loop(), and CAFirstMixA::sendToUsers().
Waits for events on the sockets.
If after ms milliseconds no event occurs, E_TIMEDOUT is returned
time_ms | - maximum milliseconds to wait |
E_TIMEDOUT,if | other ms milliseconds no event occurs |
E_UNKNOWN,if | an error occured |
Definition at line 136 of file CASocketGroupEpoll.hpp.
References E_TIMEDOUT, E_UNKNOWN, CAMutex::lock(), m_hEPFD, m_iNumOfReadyFD, m_pcsFD_SET, m_pEvents, MAX_POLLFD, and CAMutex::unlock().
SINT32 CASocketGroupEpoll::setPoolForWrite | ( | bool | bWrite | ) |
Definition at line 51 of file CASocketGroupEpoll.cpp.
References E_SUCCESS, and m_pEpollEvent.
Referenced by CASocketGroupEpoll().
|
private |
Definition at line 220 of file CASocketGroupEpoll.hpp.
Referenced by add(), CASocketGroupEpoll(), remove(), select(), and ~CASocketGroupEpoll().
|
private |
Definition at line 224 of file CASocketGroupEpoll.hpp.
Referenced by getFirstSignaledSocketData(), and getNextSignaledSocketData().
|
private |
Definition at line 223 of file CASocketGroupEpoll.hpp.
Referenced by getFirstSignaledSocketData(), getNextSignaledSocketData(), isSignaled(), and select().
|
private |
Definition at line 225 of file CASocketGroupEpoll.hpp.
Referenced by add(), CASocketGroupEpoll(), remove(), select(), and ~CASocketGroupEpoll().
|
private |
Definition at line 222 of file CASocketGroupEpoll.hpp.
Referenced by add(), CASocketGroupEpoll(), remove(), setPoolForWrite(), and ~CASocketGroupEpoll().
|
private |
Definition at line 221 of file CASocketGroupEpoll.hpp.
Referenced by CASocketGroupEpoll(), getFirstSignaledSocketData(), getNextSignaledSocketData(), isSignaled(), select(), and ~CASocketGroupEpoll().