Mixes for Privacy and Anonymity in the Internet
|
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 |
CASocketGroupEpoll::CASocketGroupEpoll | ( | bool | bWrite | ) |
References m_hEPFD, m_pcsFD_SET, m_pEpollEvent, m_pEvents, MAX_POLLFD, and setPoolForWrite().
CASocketGroupEpoll::~CASocketGroupEpoll | ( | ) |
References epoll_close, m_hEPFD, m_pcsFD_SET, m_pEpollEvent, and m_pEvents.
SINT32 CASocketGroupEpoll::add | ( | CAMuxSocket & | s | ) |
Adds the socket s to the socket group.
References add().
SINT32 CASocketGroupEpoll::add | ( | CAMuxSocket & | s, |
void * | datapointer | ||
) |
Adds the socket s to the socket group.
Additional one can set a parameter datapointer, which is assoziated with the socket s
References add(), and CAMuxSocket::getCASocket().
Adds the socket s to the socket group.
Referenced by add(), CAFirstMix::doUserLogin_internal(), CALocalProxy::loop(), CAFirstMixA::loop(), CALastMixA::loop(), and CAFirstMixB::loop().
References E_SUCCESS, E_UNKNOWN, GETERROR, CASocket::getSocket(), CAMutex::lock(), m_hEPFD, m_pcsFD_SET, m_pEpollEvent, CAMsg::printMsg(), SOCKET, and CAMutex::unlock().
void* CASocketGroupEpoll::getFirstSignaledSocketData | ( | ) |
References m_iAktSignaledSocket, m_iNumOfReadyFD, and m_pEvents.
Referenced by CAFirstMixA::loop(), CALastMixA::loop(), CAFirstMixB::loop(), CALastMixB::loop(), and CAFirstMixA::sendToUsers().
void* CASocketGroupEpoll::getNextSignaledSocketData | ( | ) |
References m_iAktSignaledSocket, m_iNumOfReadyFD, and m_pEvents.
Referenced by CAFirstMixA::loop(), CALastMixA::loop(), CAFirstMixB::loop(), CALastMixB::loop(), and CAFirstMixA::sendToUsers().
bool CASocketGroupEpoll::isSignaled | ( | CAMuxSocket & | s | ) |
References data, CAMuxSocket::getSocket(), m_iNumOfReadyFD, and m_pEvents.
bool CASocketGroupEpoll::isSignaled | ( | CASocket & | s | ) |
References data, CASocket::getSocket(), m_iNumOfReadyFD, and m_pEvents.
Referenced by CAChain::isSignaledInSocketGroup(), CALocalProxy::loop(), CAFirstMixA::loop(), CALastMixA::loop(), CAFirstMixB::loop(), and CAFirstMixA::sendToUsers().
bool CASocketGroupEpoll::isSignaled | ( | CASocket * | ps | ) |
References data, CASocket::getSocket(), m_iNumOfReadyFD, and m_pEvents.
bool CASocketGroupEpoll::isSignaled | ( | void * | datapointer | ) |
References data, m_iNumOfReadyFD, and m_pEvents.
SINT32 CASocketGroupEpoll::remove | ( | CAMuxSocket & | s | ) |
References CAMuxSocket::getCASocket(), and remove().
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().
SINT32 CASocketGroupEpoll::select | ( | ) |
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 |
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 | ) |
References E_SUCCESS, and m_pEpollEvent.
Referenced by CASocketGroupEpoll().
|
private |
Referenced by add(), CASocketGroupEpoll(), remove(), select(), and ~CASocketGroupEpoll().
|
private |
Referenced by getFirstSignaledSocketData(), and getNextSignaledSocketData().
|
private |
Referenced by getFirstSignaledSocketData(), getNextSignaledSocketData(), isSignaled(), and select().
|
private |
Referenced by add(), CASocketGroupEpoll(), remove(), select(), and ~CASocketGroupEpoll().
|
private |
Referenced by add(), CASocketGroupEpoll(), remove(), setPoolForWrite(), and ~CASocketGroupEpoll().
|
private |
Referenced by CASocketGroupEpoll(), getFirstSignaledSocketData(), getNextSignaledSocketData(), isSignaled(), select(), and ~CASocketGroupEpoll().