#include <UdpSocket.h>
§ UdpSocket() [1/4]
§ UdpSocket() [2/4]
§ UdpSocket() [3/4]
§ UdpSocket() [4/4]
BaseLib::UdpSocket::UdpSocket |
( |
BaseLib::SharedObjects * |
baseLib, |
|
|
std::string |
hostname, |
|
|
std::string |
port, |
|
|
std::string |
listenPort |
|
) |
| |
§ ~UdpSocket()
BaseLib::UdpSocket::~UdpSocket |
( |
| ) |
|
|
virtual |
§ autoConnect()
void BaseLib::UdpSocket::autoConnect |
( |
| ) |
|
|
protected |
§ close()
void BaseLib::UdpSocket::close |
( |
| ) |
|
§ getClientIp()
std::string BaseLib::UdpSocket::getClientIp |
( |
| ) |
|
|
inline |
§ getConnection()
void BaseLib::UdpSocket::getConnection |
( |
| ) |
|
|
protected |
§ getListenIp()
std::string BaseLib::UdpSocket::getListenIp |
( |
| ) |
|
|
inline |
§ getListenPort()
uint16_t BaseLib::UdpSocket::getListenPort |
( |
| ) |
|
|
inline |
§ getSocketDescriptor()
void BaseLib::UdpSocket::getSocketDescriptor |
( |
| ) |
|
|
protected |
§ isOpen()
bool BaseLib::UdpSocket::isOpen |
( |
| ) |
|
§ open()
void BaseLib::UdpSocket::open |
( |
| ) |
|
§ proofread()
int32_t BaseLib::UdpSocket::proofread |
( |
char * |
buffer, |
|
|
int32_t |
bufferSize, |
|
|
std::string & |
senderIp |
|
) |
| |
Reads bytes from UDP socket into "buffer".
- Parameters
-
[in] | buffer | The char array to write received bytes into. |
[in] | bufferSize | The size of the buffer. |
[out] | senderIp | The IP the packet was received from. |
- Returns
- Returns the number of bytes written into "buffer". Never returns 0 or a negative number.
- Exceptions
-
§ proofwrite() [1/4]
int32_t BaseLib::UdpSocket::proofwrite |
( |
const std::shared_ptr< std::vector< char >> & |
data | ) |
|
§ proofwrite() [2/4]
int32_t BaseLib::UdpSocket::proofwrite |
( |
const std::vector< char > & |
data | ) |
|
§ proofwrite() [3/4]
int32_t BaseLib::UdpSocket::proofwrite |
( |
const std::string & |
data | ) |
|
§ proofwrite() [4/4]
int32_t BaseLib::UdpSocket::proofwrite |
( |
const char * |
buffer, |
|
|
int32_t |
bytesToWrite |
|
) |
| |
§ setAutoConnect()
void BaseLib::UdpSocket::setAutoConnect |
( |
bool |
autoConnect | ) |
|
|
inline |
§ setHostname()
void BaseLib::UdpSocket::setHostname |
( |
std::string |
hostname | ) |
|
|
inline |
§ setPort()
void BaseLib::UdpSocket::setPort |
( |
std::string |
port | ) |
|
|
inline |
§ setReadTimeout()
void BaseLib::UdpSocket::setReadTimeout |
( |
int64_t |
timeout | ) |
|
|
inline |
§ _autoConnect
bool BaseLib::UdpSocket::_autoConnect = true |
|
protected |
§ _bl
§ _clientIp
std::string BaseLib::UdpSocket::_clientIp |
|
protected |
§ _hostname
std::string BaseLib::UdpSocket::_hostname |
|
protected |
§ _listenIp
std::string BaseLib::UdpSocket::_listenIp |
|
protected |
§ _listenPort
uint16_t BaseLib::UdpSocket::_listenPort = 0 |
|
protected |
§ _port
std::string BaseLib::UdpSocket::_port |
|
protected |
§ _readMutex
std::mutex BaseLib::UdpSocket::_readMutex |
|
protected |
§ _readTimeout
int64_t BaseLib::UdpSocket::_readTimeout = 15000000 |
|
protected |
§ _serverInfo
struct addrinfo* BaseLib::UdpSocket::_serverInfo = nullptr |
|
protected |
§ _socketDescriptor
§ _writeMutex
std::mutex BaseLib::UdpSocket::_writeMutex |
|
protected |
The documentation for this class was generated from the following files: