Mixes for Privacy and Anonymity in the Internet
|
Public Member Functions | |
CASocketGroup (bool bWrite) | |
~CASocketGroup () | |
SINT32 | setPoolForWrite (bool bWrite) |
SINT32 | add (SOCKET &s) |
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. More... | |
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, MAX_POLLFD, and setPoolForWrite().
CASocketGroup::~CASocketGroup | ( | ) |
SINT32 CASocketGroup::add | ( | CAMuxSocket & | s | ) |
References E_SUCCESS, CAMuxSocket::getSocket(), CAMutex::lock(), m_csFD_SET, m_fdset, m_max, and CAMutex::unlock().
References E_SUCCESS, CASocket::getSocket(), CAMutex::lock(), m_csFD_SET, m_fdset, m_max, and CAMutex::unlock().
References E_SUCCESS, CAMutex::lock(), m_csFD_SET, m_fdset, m_max, and CAMutex::unlock().
Referenced by CAChain::addToSocketGroup(), CAMuxSocket::receive(), CAClientSocket::receiveFully(), CASocket::sendFully(), CASocket::sendFullyTimeOut(), and CASocket::setSocket().
bool CASocketGroup::isSignaled | ( | CAMuxSocket & | s | ) |
References CAMuxSocket::getSocket(), and m_signaled_set.
bool CASocketGroup::isSignaled | ( | CASocket & | s | ) |
References CASocket::getSocket(), and m_signaled_set.
bool CASocketGroup::isSignaled | ( | CASocket * | ps | ) |
References CASocket::getSocket(), and m_signaled_set.
SINT32 CASocketGroup::remove | ( | CAMuxSocket & | s | ) |
References E_SUCCESS, CAMuxSocket::getSocket(), CAMutex::lock(), m_csFD_SET, m_fdset, and CAMutex::unlock().
References E_SUCCESS, CASocket::getSocket(), CAMutex::lock(), m_csFD_SET, m_fdset, and CAMutex::unlock().
Referenced by CAChain::removeFromSocketGroup().
SINT32 CASocketGroup::select | ( | ) |
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 CAMuxSocket::receive(), CAClientSocket::receiveFully(), CASocket::receiveFullyT(), CASocket::receiveLine(), select(), CASingleSocketGroup::select_once(), CASocket::sendFully(), and CASocket::sendFullyTimeOut().
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().
|
private |
Referenced by add(), CASocketGroup(), remove(), and select().
|
private |
Referenced by add(), CASocketGroup(), and select().
|
private |
Referenced by select(), and setPoolForWrite().
|
private |
Referenced by select(), and setPoolForWrite().
|
private |
Referenced by CASocketGroup(), isSignaled(), select(), and setPoolForWrite().