|
Mixes for Privacy and Anonymity in the Internet
|
Public Member Functions | |
| CASocketGroupEpoll (bool bWrite) | |
| ~CASocketGroupEpoll () | |
| SINT32 | setPoolForWrite (bool bWrite) |
| SINT32 | add (CASocket &s, void *datapointer) |
| Adds the socket s to the socket group. | |
| SINT32 | add (CAMuxSocket &s, void *datapointer) |
| Adds the socket s to the socket group. | |
| SINT32 | remove (CASocket &s) |
| SINT32 | remove (CAMuxSocket &s) |
| SINT32 | select () |
| SINT32 | select (UINT32 time_ms) |
| Waits for events on the sockets. | |
| bool | isSignaled (void *datapointer) |
| void * | getFirstSignaledSocketData () |
| void * | getNextSignaledSocketData () |
Private Attributes | |
| SINT32 | m_hEPFD |
| struct epoll_event * | m_pEvents |
| struct epoll_event * | m_pEpollEvent |
| SINT32 | m_iNumOfReadyFD |
| SINT32 | m_iAktSignaledSocket |
| CAMutex | m_csFD_SET |
| CASocketGroupEpoll::CASocketGroupEpoll | ( | bool | bWrite | ) |
References m_hEPFD, m_pEpollEvent, m_pEvents, MAX_POLLFD, and setPoolForWrite().
References m_hEPFD, m_pEpollEvent, and m_pEvents.
| SINT32 CASocketGroupEpoll::add | ( | CASocket & | s, |
| void * | datapointer | ||
| ) |
Adds the socket s to the socket group.
Additional one can set a parameter datapointer, which is assoziated with the socke s
References E_SUCCESS, CASocket::getSocket(), CAMutex::lock(), m_csFD_SET, m_hEPFD, m_pEpollEvent, SOCKET, and CAMutex::unlock().
Referenced by CAFirstMix::doUserLogin_internal(), CAFirstMixB::loop(), and CAFirstMixA::loop().
| 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 socke s
References E_SUCCESS, CAMuxSocket::getSocket(), CAMutex::lock(), m_csFD_SET, m_hEPFD, m_pEpollEvent, SOCKET, and CAMutex::unlock().
References m_iAktSignaledSocket, m_iNumOfReadyFD, and m_pEvents.
Referenced by CAFirstMixB::loop(), CAFirstMixA::loop(), and CAFirstMixA::sendToUsers().
References m_iAktSignaledSocket, m_iNumOfReadyFD, and m_pEvents.
Referenced by CAFirstMixB::loop(), CAFirstMixA::loop(), and CAFirstMixA::sendToUsers().
| bool CASocketGroupEpoll::isSignaled | ( | void * | datapointer | ) |
References m_iNumOfReadyFD, and m_pEvents.
Referenced by CAChain::isSignaledInSocketGroup(), CAFirstMixB::loop(), CAFirstMixA::loop(), and CAFirstMixA::sendToUsers().
References ASSERT, E_SUCCESS, E_UNKNOWN, CAMutex::lock(), m_csFD_SET, m_hEPFD, m_pEpollEvent, and CAMutex::unlock().
Referenced by CAFirstMixA::closeConnection(), CAFirstMixB::loop(), and CAChain::removeFromAllSocketGroupsInternal().
References ASSERT, E_SUCCESS, E_UNKNOWN, CAMutex::lock(), m_csFD_SET, m_hEPFD, m_pEpollEvent, and CAMutex::unlock().
References E_UNKNOWN, CAMutex::lock(), m_csFD_SET, m_hEPFD, m_iNumOfReadyFD, m_pEvents, MAX_POLLFD, and CAMutex::unlock().
Referenced by CAFirstMixB::loop(), CAFirstMixA::loop(), and CAFirstMixA::sendToUsers().
| SINT32 CASocketGroupEpoll::select | ( | UINT32 | time_ms | ) |
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_csFD_SET, m_hEPFD, m_iNumOfReadyFD, m_pEvents, MAX_POLLFD, and CAMutex::unlock().
| SINT32 CASocketGroupEpoll::setPoolForWrite | ( | bool | bWrite | ) |
References E_SUCCESS, and m_pEpollEvent.
Referenced by CASocketGroupEpoll().
CAMutex CASocketGroupEpoll::m_csFD_SET [private] |
SINT32 CASocketGroupEpoll::m_hEPFD [private] |
Referenced by add(), CASocketGroupEpoll(), remove(), select(), and ~CASocketGroupEpoll().
Referenced by getFirstSignaledSocketData(), and getNextSignaledSocketData().
SINT32 CASocketGroupEpoll::m_iNumOfReadyFD [private] |
Referenced by getFirstSignaledSocketData(), getNextSignaledSocketData(), isSignaled(), and select().
struct epoll_event* CASocketGroupEpoll::m_pEpollEvent [private] |
Referenced by add(), CASocketGroupEpoll(), remove(), setPoolForWrite(), and ~CASocketGroupEpoll().
struct epoll_event* CASocketGroupEpoll::m_pEvents [private] |
Referenced by CASocketGroupEpoll(), getFirstSignaledSocketData(), getNextSignaledSocketData(), isSignaled(), select(), and ~CASocketGroupEpoll().
1.7.6.1