public

Inheritance Graph

graph BT
	UDPNetworkSocket
	click UDPNetworkSocket "classUtil_1_1Network_1_1UDPNetworkSocket"

Description

[ UDPNetworkSocket ]

Classes

   
struct Util::Network::UDPNetworkSocket::Packet

Public Static Attributes

   
   
const int defaultMaxPktSize

Public Functions

   
   
  UDPNetworkSocket(uint16_t port, int maxPktSize)
   
  ~UDPNetworkSocket()
   
bool open()
   
bool isOpen() const
   
void close()
   
Packet * receive()
   
int sendData(const uint8_t * data, size_t dataSize)
   
bool sendData(const uint8_t * data, size_t dataSize, const IPv4Address & ip)
   
int sendString(const std::string & data)
   
void addTarget(const IPv4Address & address)
   
void removeTarget(const IPv4Address & address)
   
uint16_t getPort() const

Documentation

variable
Util::Network::UDPNetworkSocket::defaultMaxPktSize

public static
 
 
const int defaultMaxPktSize

Defined in Util/Network/NetworkUDP.h:33


function
Util::Network::UDPNetworkSocket::UDPNetworkSocket

public explicit
     
     
UDPNetworkSocket( uint16_t port,
  int maxPktSize
)    

Defined in Util/Network/NetworkUDP.h:35


function
Util::Network::UDPNetworkSocket::~UDPNetworkSocket

public virtual
   
   
~UDPNetworkSocket( )

Defined in Util/Network/NetworkUDP.h:36


function
Util::Network::UDPNetworkSocket::open

public
   
   
bool open( )

Defined in Util/Network/NetworkUDP.h:38


function
Util::Network::UDPNetworkSocket::isOpen

public const
   
   
bool isOpen( ) const

Defined in Util/Network/NetworkUDP.h:39


function
Util::Network::UDPNetworkSocket::close

public
   
   
void close( )

Defined in Util/Network/NetworkUDP.h:40


function
Util::Network::UDPNetworkSocket::receive

public
   
   
Packet * receive( )

Returns

If data is available, a Packet-object with the data nullptr otherwise

Note: The caller is responsible for deleting the received packet.

Defined in Util/Network/NetworkUDP.h:64


function
Util::Network::UDPNetworkSocket::sendData

public
     
     
int sendData( const uint8_t * data,
  size_t dataSize
)    

Defined in Util/Network/NetworkUDP.h:65


function
Util::Network::UDPNetworkSocket::sendData

public
     
     
bool sendData( const uint8_t * data,
  size_t dataSize,
  const IPv4Address & ip
)    

Defined in Util/Network/NetworkUDP.h:67


function
Util::Network::UDPNetworkSocket::sendString

public
     
     
int sendString( const std::string & data )

Defined in Util/Network/NetworkUDP.h:69


function
Util::Network::UDPNetworkSocket::addTarget

public
     
     
void addTarget( const IPv4Address & address )

Defined in Util/Network/NetworkUDP.h:71


function
Util::Network::UDPNetworkSocket::removeTarget

public
     
     
void removeTarget( const IPv4Address & address )

Defined in Util/Network/NetworkUDP.h:72


function
Util::Network::UDPNetworkSocket::getPort

public const
   
   
uint16_t getPort( ) const

Defined in Util/Network/NetworkUDP.h:74