#include <Socket.h>
Definition at line 539 of file Socket.h.
◆ SocketSet()
| agxNet::SocketSet::SocketSet |
( |
| ) |
|
Creates a socket set of the specified size.
Creates a socket set which can hold the specified number of sockets at maximum.
◆ ~SocketSet()
| virtual agxNet::SocketSet::~SocketSet |
( |
| ) |
|
|
inlineprotectedvirtual |
Destroys the socket set.
Note, that it does not destroy the sockets this set holds references to.
Definition at line 601 of file Socket.h.
◆ addSocket()
| bool agxNet::SocketSet::addSocket |
( |
Socket * |
sock | ) |
|
Add a socket to socket set.
- Parameters
-
| sock | - pointer to the socket object to add. |
- Returns
- false if socket is already added
◆ checkSockets()
| bool agxNet::SocketSet::checkSockets |
( |
agx::UInt32 |
timeoutMillis | ) |
|
Check sockets from socket set for activity.
This method checks sockets for activities of incoming data ready or remote socket has disconnected. This method sets ready flag for all sockets with activity which can later be checked by Socket::IsReady() method. The ready flag will be cleared by subsequent TCPSocket::Recv() function call.
- Parameters
-
| timeoutMillis | - maximum number of milliseconds to wait for socket activity to appear. if 0 is specified the function will not wait and will return immediately. |
- Returns
- true if there is at least one socket with activity.
-
false if there are no any sockets with activities.
◆ getMaxSockets()
| size_t agxNet::SocketSet::getMaxSockets |
( |
| ) |
const |
Returns maximal number of sockets the system allows.
- Returns
- maximal number of sockets available in the system.
◆ getNumSockets()
| size_t agxNet::SocketSet::getNumSockets |
( |
| ) |
const |
|
inline |
Returns number of sockets the socket set currently holds.
- Returns
- number of sockets the socket set currently holds.
Definition at line 553 of file Socket.h.
◆ getSockets()
◆ removeSocket()
| bool agxNet::SocketSet::removeSocket |
( |
Socket * |
sock | ) |
|
Remove socket from socket set.
- Parameters
-
| sock | - pointer to socket object which we want to remove from the set. |
- Returns
- false if socket is not previously added
The documentation for this class was generated from the following file: