![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cNetSocketSet.h>
Public Member Functions | |
cNetSocketSet () | |
cNetSocketSet (SOCKET hSocket) | |
cNetSocketSet (const cNetSocket &socket) | |
cNetSocketSet (const fd_set *pfds) | |
cNetSocketSet (const cNetSocketSet &nss) | |
~cNetSocketSet () | |
void | operator= (const fd_set *pfds) |
void | operator= (const cNetSocketSet &nss) |
void | CopySockets (const fd_set *pfds) |
bool | AddSocket (SOCKET hSocket) |
void | RemoveSocket (SOCKET hSocket) |
bool | IsSocketSet (SOCKET hSocket) const |
void | ClearSockets () noexcept |
int | get_NFDS () const noexcept |
void | put_NFDS (int iCount) noexcept |
operator fd_set * () | |
operator const fd_set * () const | |
Static Public Member Functions | |
static int GRAYCALL | Select (fd_set *pReadSet, fd_set *pWriteSet=nullptr, fd_set *pExceptSet=nullptr, const cTimeVal *pTimeout=nullptr) |
Public Attributes | |
fd_set | m_fds |
array of FD_SETSIZE possible SOCKET(s). NOTE: sizeof(m_fds) varies with FD_SETSIZE More... | |
Static Public Attributes | |
static const int | k_nSocketSetSize = FD_SETSIZE |
= FD_SETSIZE. Max number of sockets i can add to this array. More... | |
Wrapper for polling a fd_set of SOCKETs. like cOSHandleSet Max size is set to FD_SETSIZE (default=64 for _WIN32) (can be changed at compile time!)
|
inline |
|
inline |
A socket set with a single socket.
|
inline |
A socket set with a single socket.
|
inline |
Copy a socket set.
|
inline |
Copy a socket set.
|
inline |
bool GrayLib::cNetSocketSet::AddSocket | ( | SOCKET | hSocket | ) |
What happens if m_fds array is full? k_nSocketSetSize/FD_SETSIZE.
|
inlinenoexcept |
clear the socket set.
|
inline |
linux FD_COPY(pfds,&m_fds);
|
inlinenoexcept |
The number of sockets in this set. sm_nSocketSetNFDS = FD_SETSIZE or Highest id of socket in the set ?
|
inline |
Some activity on the socket?
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinenoexcept |
Restore the fd_count if it is cleared by a previous call to ::select()
void GrayLib::cNetSocketSet::RemoveSocket | ( | SOCKET | hSocket | ) |
|
static |
Any sockets have anything to do? similar to cOSHandleSet
|
static |
= FD_SETSIZE. Max number of sockets i can add to this array.
fd_set GrayLib::cNetSocketSet::m_fds |
array of FD_SETSIZE possible SOCKET(s). NOTE: sizeof(m_fds) varies with FD_SETSIZE