#include <Socket.h>
Definition at line 244 of file Socket.h.
◆ ~Socket()
| virtual agxNet::Socket::~Socket |
( |
| ) |
|
|
inlineprotectedvirtual |
◆ Socket()
◆ adr()
| const IPAddress& agxNet::Socket::adr |
( |
| ) |
const |
|
inline |
◆ close()
| void agxNet::Socket::close |
( |
| ) |
|
Closes the socket disconnecting it if necessary.
◆ getLastError()
| static int agxNet::Socket::getLastError |
( |
| ) |
|
|
static |
Returns the last reported error from a system call.
Should be called immediately after a socket/connect call has failed. Typically:
retval = ::select(int(handle + 1), &readMask, &writeMask, nullptr, &tv);
if (retval == M_SOCKET_ERROR)
int errorNo = Socket::getLastError();
◆ isBlocking()
| bool agxNet::Socket::isBlocking |
( |
| ) |
const |
|
inline |
◆ isReady()
| bool agxNet::Socket::isReady |
( |
| ) |
const |
|
inline |
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 277 of file Socket.h.
◆ isValid()
| bool agxNet::Socket::isValid |
( |
| ) |
const |
Tells whether the socket is opened or not.
TODO: write some detailed description.
- Returns
- Returns true if the socket is opened or false otherwise.
◆ operator=()
◆ readyToReceive()
| bool agxNet::Socket::readyToReceive |
( |
| ) |
const |
|
inline |
◆ readyToSend()
| bool agxNet::Socket::readyToSend |
( |
| ) |
const |
|
inline |
◆ select()
| void agxNet::Socket::select |
( |
agx::UInt32 |
timeoutMillis = 0 | ) |
|
◆ setBlocking()
| void agxNet::Socket::setBlocking |
( |
bool |
flag | ) |
|
◆ m_adr
◆ m_blocking
| bool agxNet::Socket::m_blocking |
|
protected |
◆ m_readyToReceive
| bool agxNet::Socket::m_readyToReceive |
|
protected |
◆ m_readyToSend
| bool agxNet::Socket::m_readyToSend |
|
protected |
◆ m_socket
The documentation for this class was generated from the following file: