Mixe for Privacy and Anonymity in the Internet
|
#include <CASocketGroup.hpp>
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 |
Definition at line 36 of file CASocketGroup.hpp.
CASocketGroup::CASocketGroup | ( | bool | bWrite | ) |
Definition at line 37 of file CASocketGroup.cpp.
References m_fdset, m_max, m_signaled_set, MAX_POLLFD, and setPoolForWrite().
|
inline |
Definition at line 40 of file CASocketGroup.hpp.
|
inline |
Definition at line 98 of file CASocketGroup.hpp.
References E_SUCCESS, CAMuxSocket::getSocket(), CAMutex::lock(), m_csFD_SET, m_fdset, m_max, and CAMutex::unlock().
Definition at line 74 of file CASocketGroup.hpp.
References E_SUCCESS, CASocket::getSocket(), CAMutex::lock(), m_csFD_SET, m_fdset, m_max, and CAMutex::unlock().
Definition at line 50 of file CASocketGroup.hpp.
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().
|
inline |
Definition at line 145 of file CASocketGroup.hpp.
References CAMuxSocket::getSocket(), and m_signaled_set.
|
inline |
Definition at line 127 of file CASocketGroup.hpp.
References CASocket::getSocket(), and m_signaled_set.
|
inline |
Definition at line 136 of file CASocketGroup.hpp.
References CASocket::getSocket(), and m_signaled_set.
SINT32 CASocketGroup::remove | ( | CAMuxSocket & | s | ) |
Definition at line 97 of file CASocketGroup.cpp.
References E_SUCCESS, CAMuxSocket::getSocket(), CAMutex::lock(), m_csFD_SET, m_fdset, and CAMutex::unlock().
Definition at line 80 of file CASocketGroup.cpp.
References E_SUCCESS, CASocket::getSocket(), CAMutex::lock(), m_csFD_SET, m_fdset, and CAMutex::unlock().
Referenced by CAChain::removeFromSocketGroup().
SINT32 CASocketGroup::select | ( | ) |
Definition at line 114 of file CASocketGroup.cpp.
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 |
Definition at line 153 of file CASocketGroup.cpp.
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().
|
inline |
Definition at line 53 of file CASocketGroup.cpp.
References E_SUCCESS, m_set_read, m_set_write, m_signaled_set, and MAX_POLLFD.
Referenced by CASocketGroup().
|
private |
Definition at line 166 of file CASocketGroup.hpp.
|
private |
Definition at line 156 of file CASocketGroup.hpp.
Referenced by add(), CASocketGroup(), remove(), and select().
|
private |
Definition at line 160 of file CASocketGroup.hpp.
Referenced by add(), CASocketGroup(), and select().
|
private |
Definition at line 158 of file CASocketGroup.hpp.
Referenced by select(), and setPoolForWrite().
|
private |
Definition at line 158 of file CASocketGroup.hpp.
Referenced by select(), and setPoolForWrite().
|
private |
Definition at line 157 of file CASocketGroup.hpp.
Referenced by CASocketGroup(), isSignaled(), select(), and setPoolForWrite().