UDP/IP socket class. More...

#include <udp_socket.h>

+ Inheritance diagram for clan::UDPSocket:

Public Member Functions

 UDPSocket ()
 Create socket object.
 
 ~UDPSocket ()
 
void bind (const SocketName &endpoint)
 Bind socket to end point.
 
void close ()
 Close connection.
 
int read (void *data, int size, SocketName &endpoint)
 Read receved UDP packet.
 
void send (const void *data, int size, const SocketName &endpoint)
 Send UDP packet to end point.
 

Protected Member Functions

SocketHandle * get_socket_handle () override
 
- Protected Member Functions inherited from clan::NetworkEvent

Detailed Description

UDP/IP socket class.

Constructor & Destructor Documentation

◆ UDPSocket()

clan::UDPSocket::UDPSocket ( )

Create socket object.

◆ ~UDPSocket()

clan::UDPSocket::~UDPSocket ( )

Member Function Documentation

◆ bind()

void clan::UDPSocket::bind ( const SocketName & endpoint)

Bind socket to end point.

◆ close()

void clan::UDPSocket::close ( )

Close connection.

◆ get_socket_handle()

SocketHandle * clan::UDPSocket::get_socket_handle ( )
overrideprotectedvirtual

Implements clan::NetworkEvent.

◆ read()

int clan::UDPSocket::read ( void * data,
int size,
SocketName & endpoint )

Read receved UDP packet.

Returns
Bytes read or 0 if no packet was available

◆ send()

void clan::UDPSocket::send ( const void * data,
int size,
const SocketName & endpoint )

Send UDP packet to end point.


The documentation for this class was generated from the following file: