|
Mixes for Privacy and Anonymity in the Internet
|
Public Member Functions | |
| CASocketGroup (bool bWrite) | |
| ~CASocketGroup () | |
| SINT32 | setPoolForWrite (bool bWrite) |
| SINT32 | add (CASocket &s) |
| SINT32 | add (CAMuxSocket &s) |
| SINT32 | remove (CASocket &s) |
| SINT32 | remove (CAMuxSocket &s) |
| SINT32 | select () |
| SINT32 | select (UINT32 time_ms) |
| Waits for events on the sockets. | |
| bool | isSignaled (CASocket &s) |
| bool | isSignaled (CASocket *ps) |
| bool | isSignaled (CAMuxSocket &s) |
Private Attributes | |
| fd_set | m_fdset |
| fd_set | m_signaled_set |
| fd_set * | m_set_read |
| fd_set * | m_set_write |
| SINT32 | m_max |
| CAMutex | m_csFD_SET |
| CASocketGroup::CASocketGroup | ( | bool | bWrite | ) |
References m_fdset, m_max, m_signaled_set, and setPoolForWrite().
| SINT32 CASocketGroup::add | ( | CASocket & | s | ) |
References E_SUCCESS, CASocket::getSocket(), CAMutex::lock(), m_csFD_SET, m_fdset, m_max, and CAMutex::unlock().
Referenced by CAChain::addToSocketGroup(), fm_loopAcceptUsers(), fm_loopReadFromMix(), lm_loopReadFromMix(), CALastMixA::loop(), CALocalProxy::loop(), CAMiddleMix::loop(), mm_loopReadFromMixAfter(), mm_loopReadFromMixBefore(), CAMuxSocket::receive(), CASocket::receiveFullyT(), and CASocket::receiveLine().
| SINT32 CASocketGroup::add | ( | CAMuxSocket & | s | ) |
References E_SUCCESS, CAMuxSocket::getSocket(), CAMutex::lock(), m_csFD_SET, m_fdset, m_max, and CAMutex::unlock().
| bool CASocketGroup::isSignaled | ( | CASocket & | s | ) |
References CASocket::getSocket(), and m_signaled_set.
Referenced by fm_loopAcceptUsers(), CALastMixA::loop(), and CALocalProxy::loop().
| bool CASocketGroup::isSignaled | ( | CASocket * | ps | ) |
References CASocket::getSocket(), and m_signaled_set.
| bool CASocketGroup::isSignaled | ( | CAMuxSocket & | s | ) |
References CAMuxSocket::getSocket(), and m_signaled_set.
| SINT32 CASocketGroup::remove | ( | CASocket & | s | ) |
References E_SUCCESS, CASocket::getSocket(), CAMutex::lock(), m_csFD_SET, m_fdset, and CAMutex::unlock().
Referenced by fm_loopAcceptUsers(), CALastMixA::loop(), CALocalProxy::loop(), and CAChain::removeFromSocketGroup().
References E_SUCCESS, CAMuxSocket::getSocket(), CAMutex::lock(), m_csFD_SET, m_fdset, and CAMutex::unlock().
References GET_NET_ERROR, CAMutex::lock(), m_csFD_SET, m_fdset, m_max, m_set_read, m_set_write, m_signaled_set, CAMsg::printMsg(), SOCKET_ERROR, and CAMutex::unlock().
Referenced by fm_loopAcceptUsers(), fm_loopReadFromMix(), lm_loopReadFromMix(), CALastMixA::loop(), CALastMixB::loop(), CALocalProxy::loop(), mm_loopReadFromMixAfter(), mm_loopReadFromMixBefore(), CAMuxSocket::receive(), CASocket::receiveFullyT(), CASocket::receiveLine(), select(), and CASingleSocketGroup::select_once().
| SINT32 CASocketGroup::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, GET_NET_ERROR, CAMutex::lock(), m_csFD_SET, m_fdset, m_max, m_set_read, m_set_write, m_signaled_set, CAMsg::printMsg(), select(), SOCKET_ERROR, and CAMutex::unlock().
| SINT32 CASocketGroup::setPoolForWrite | ( | bool | bWrite | ) |
References E_SUCCESS, m_set_read, m_set_write, m_signaled_set, and MAX_POLLFD.
Referenced by CASocketGroup().
CAMutex CASocketGroup::m_csFD_SET [private] |
fd_set CASocketGroup::m_fdset [private] |
Referenced by add(), CASocketGroup(), remove(), and select().
SINT32 CASocketGroup::m_max [private] |
Referenced by add(), CASocketGroup(), and select().
fd_set* CASocketGroup::m_set_read [private] |
Referenced by select(), and setPoolForWrite().
fd_set * CASocketGroup::m_set_write [private] |
Referenced by select(), and setPoolForWrite().
fd_set CASocketGroup::m_signaled_set [private] |
Referenced by CASocketGroup(), isSignaled(), select(), and setPoolForWrite().
1.7.6.1