Mixes for Privacy and Anonymity in the Internet
Public Member Functions | Private Attributes
CASocketGroup Class Reference
Inheritance diagram for CASocketGroup:
CASingleSocketGroup

List of all members.

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

Constructor & Destructor Documentation

CASocketGroup::CASocketGroup ( bool  bWrite)

Member Function Documentation

Waits for events on the sockets.

If after ms milliseconds no event occurs, E_TIMEDOUT is returned

Parameters:
time_ms- maximum milliseconds to wait
Return values:
E_TIMEDOUT,ifother ms milliseconds no event occurs
E_UNKNOWN,ifan error occured
Returns:
number of read/writeable sockets

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().


Member Data Documentation

Referenced by add(), remove(), and select().

fd_set CASocketGroup::m_fdset [private]

Referenced by add(), CASocketGroup(), remove(), and select().

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().