#include <Socket.h>
Definition at line 475 of file Socket.h.
| agxNet::UDPSocket::UDPSocket |
( |
| ) |
|
|
inline |
| virtual agxNet::UDPSocket::~UDPSocket |
( |
| ) |
|
|
inlineprotectedvirtual |
| const IPAddress& agxNet::Socket::adr |
( |
| ) |
const |
|
inlineinherited |
| void agx::Referenced::allocateObserverVector |
( |
| ) |
const |
|
protectedinherited |
template<typename T >
| T* agx::Referenced::as |
( |
| ) |
|
|
inherited |
template<typename T >
| const T* agx::Referenced::as |
( |
| ) |
const |
|
inherited |
template<typename T >
| T* agx::Referenced::asSafe |
( |
| ) |
|
|
inherited |
template<typename T >
| const T* agx::Referenced::asSafe |
( |
| ) |
const |
|
inherited |
| void agxNet::Socket::close |
( |
| ) |
|
|
inherited |
Closes the socket disconnecting it if necessary.
| void agx::Referenced::deleteUsingDeleteHandler |
( |
| ) |
const |
|
protectedinherited |
| int agx::Referenced::getReferenceCount |
( |
| ) |
const |
|
inherited |
- Returns
- the number pointers currently referencing this object.
template<typename T >
| bool agx::Referenced::is |
( |
| ) |
const |
|
inherited |
| bool agxNet::Socket::isBlocking |
( |
| ) |
const |
|
inlineinherited |
| bool agxNet::Socket::isReady |
( |
| ) |
const |
|
inlineinherited |
Tells whether there is some activity on the socket or not.
See SocketSet class description for more info on how to use this method properly.
- Returns
- true if there is some data to read on the socket or if the remote socket has disconnected. The latter case can be detected by checking if subsequent Recv() method returns 0.
- false if there is no any activity on the socket.
Definition at line 268 of file Socket.h.
| bool agxNet::Socket::isValid |
( |
| ) |
const |
|
inherited |
Tells whether the socket is opened or not.
TODO: write some detailed description.
- Returns
- Returns true if the socket is opened or false otherwise.
Open the socket.
This method opens the socket, this socket can further be used to send or receive data. After the socket is opened it becomes a valid socket and Socket::IsValid() will return true for such socket. After the socket is closed it becomes invalid. In other words, a valid socket is an opened socket. In case of errors this method throws NetError.
- Parameters
-
| port | - IP port number on which the socket will listen for incoming datagrams. This is useful for server-side sockets, for client-side sockets use UDPSocket::Open(). |
| void agxNet::UDPSocket::open |
( |
| ) |
|
|
inline |
| bool agxNet::Socket::readyToReceive |
( |
| ) |
const |
|
inlineinherited |
| bool agxNet::Socket::readyToSend |
( |
| ) |
const |
|
inlineinherited |
| 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.
Referenced by agxData::Val< UInt >::Val().
| void agxNet::Socket::setBlocking |
( |
bool |
flag | ) |
|
|
inherited |
Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
| 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.
| 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.
template<typename T >
| static bool agx::Referenced::ValidateCast |
( |
const Referenced * |
object | ) |
|
|
staticinherited |
| bool agxNet::Socket::m_blocking |
|
protectedinherited |
| Mutex agx::Referenced::m_mutex |
|
mutableprotectedinherited |
|
|
mutableprotectedinherited |
| bool agxNet::Socket::m_readyToReceive |
|
protectedinherited |
| bool agxNet::Socket::m_readyToSend |
|
protectedinherited |
| AtomicValue agx::Referenced::m_refCount |
|
mutableprotectedinherited |
The documentation for this class was generated from the following file: