#include <socket.h>
◆ UDPSocket() [1/2]
◆ UDPSocket() [2/2]
UDPSocket::UDPSocket |
( |
bool | ipv6 | ) |
|
◆ ~UDPSocket()
UDPSocket::~UDPSocket |
( |
| ) |
|
◆ Bind()
void UDPSocket::Bind |
( |
Address | addr | ) |
|
References errorstream, Address::getAddress(), Address::getAddress6(), Address::getFamily(), Address::getPort(), LAST_SOCKET_ERR, m_addr_family, m_handle, SOCKET_ERR_STR, and tracestream.
Referenced by con::ConnectionSendThread::connect(), con::ConnectionSendThread::serve(), TestSocket::testIPv4Socket(), and TestSocket::testIPv6Socket().
◆ GetHandle()
int UDPSocket::GetHandle |
( |
| ) |
const |
|
inline |
◆ init()
bool UDPSocket::init |
( |
bool | ipv6, |
|
|
bool | noExceptions = false ) |
◆ Receive()
int UDPSocket::Receive |
( |
Address & | sender, |
|
|
void * | data, |
|
|
int | size ) |
◆ Send()
void UDPSocket::Send |
( |
const Address & | destination, |
|
|
const void * | data, |
|
|
int | size ) |
References Address::getAddress(), Address::getAddress6(), Address::getFamily(), Address::getPort(), INTERNET_SIMULATOR, INTERNET_SIMULATOR_PACKET_LOSS, m_addr_family, m_handle, myrand(), and tracestream.
Referenced by con::ConnectionSendThread::rawSend(), TestSocket::testIPv4Socket(), and TestSocket::testIPv6Socket().
◆ setTimeoutMs()
void UDPSocket::setTimeoutMs |
( |
int | timeout_ms | ) |
|
◆ WaitData()
bool UDPSocket::WaitData |
( |
int | timeout_ms | ) |
|
◆ m_addr_family
unsigned short UDPSocket::m_addr_family = 0 |
|
private |
◆ m_handle
int UDPSocket::m_handle = -1 |
|
private |
◆ m_timeout_ms
int UDPSocket::m_timeout_ms = -1 |
|
private |
The documentation for this class was generated from the following files: