#include <Socket.h>
Definition at line 518 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 580 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
◆ allocateObserverVector()
| void agx::Referenced::allocateObserverVector |
( |
| ) |
const |
|
protectedinherited |
◆ as() [1/2]
template<typename T >
| T* agx::Referenced::as |
( |
| ) |
|
|
inherited |
◆ as() [2/2]
template<typename T >
| const T* agx::Referenced::as |
( |
| ) |
const |
|
inherited |
◆ asSafe() [1/2]
template<typename T >
| T* agx::Referenced::asSafe |
( |
| ) |
|
|
inherited |
◆ asSafe() [2/2]
template<typename T >
| const T* agx::Referenced::asSafe |
( |
| ) |
const |
|
inherited |
◆ 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.
◆ deleteUsingDeleteHandler()
| void agx::Referenced::deleteUsingDeleteHandler |
( |
| ) |
const |
|
protectedinherited |
◆ getDeleteHandler()
◆ 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 532 of file Socket.h.
◆ getReferenceCount()
| int agx::Referenced::getReferenceCount |
( |
| ) |
const |
|
inherited |
- Returns
- the number pointers currently referencing this object.
◆ getSockets()
| const SocketRefVector& agxNet::SocketSet::getSockets |
( |
| ) |
const |
|
inline |
◆ is()
template<typename T >
| bool agx::Referenced::is |
( |
| ) |
const |
|
inherited |
◆ reference()
| void agx::Referenced::reference |
( |
void * |
ptr = nullptr | ) |
const |
|
inherited |
Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.
This method should be used with care, always balanced with the same number of calls to unreference.
◆ 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
◆ setDeleteHandler()
Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
◆ unreference()
| void agx::Referenced::unreference |
( |
void * |
ptr = nullptr | ) |
const |
|
inherited |
Decrement the reference count by one, indicating that a pointer to this object is referencing it.
If the reference count goes to zero, it is assumed that this object is no longer referenced and is automatically deleted.
This method should be used with care, always balanced with the same number of calls to reference.
Referenced by agxData::EntityRef< ContactMaterialPtr >::~EntityRef().
◆ unreference_nodelete()
| void agx::Referenced::unreference_nodelete |
( |
| ) |
const |
|
inherited |
Decrement the reference count by one, indicating that a pointer to this object is referencing it.
However, do not delete it, even if ref count goes to 0. Warning, unref_nodelete() should only be called if the user knows exactly who will be responsible for, one should prefer unref() over unref_nodelete() as the later can lead to memory leaks.
◆ ValidateCast()
template<typename T >
| static bool agx::Referenced::ValidateCast |
( |
const Referenced * |
object | ) |
|
|
staticinherited |
◆ m_mutex
| Mutex agx::Referenced::m_mutex |
|
mutableprotectedinherited |
◆ m_observers
|
|
mutableprotectedinherited |
◆ m_refCount
| AtomicValue agx::Referenced::m_refCount |
|
mutableprotectedinherited |
The documentation for this class was generated from the following file: