NetBurner 3.1
UDP - C++ object API

The NetBurner UDP protocol API is implemented in two ways: More...

Modules

 UDP Error Codes
 

Classes

class  UDPPacket
 UDP Packet Class. More...
 

Functions

void RegisterUDPFifo (uint16_t listenPort, OS_FIFO *pFifo)
 Register a FIFO to receive incoming UDP packets. More...
 
void RegisterUDPFifoWithNotify (uint16_t listenPort, OS_FIFO *pFifo, udp_data_notify *pNotifyFunction)
 Register a FIFO to receive incoming UDP packets and a callback function to receive a notification when a packet is received. More...
 
void UnregisterUDPFifo (uint16_t listenPort, bool drain=false)
 Unregister a UDP FIFO. More...
 

Detailed Description

The NetBurner UDP protocol API is implemented in two ways:

  1. As a C++ class, which makes memory management easier.
  2. Wrapper functions that implement a UDP sockets interface.

Function Documentation

◆ RegisterUDPFifo()

void RegisterUDPFifo ( uint16_t  listenPort,
OS_FIFO pFifo 
)

Register a FIFO to receive incoming UDP packets.

A OS_FIFO is used to receive incoming UDP Packets. This function registers an OS_FIFO to listen to a specific UDP port number.

Parameters
listenPortPort to listen on for incoming packets
pFifoPointer to the OS_FIFO to register
See also
RegisterUDPFifoWithNotify(), UnregisterUDPFifo()

◆ RegisterUDPFifoWithNotify()

void RegisterUDPFifoWithNotify ( uint16_t  listenPort,
OS_FIFO pFifo,
udp_data_notify *  pNotifyFunction 
)

Register a FIFO to receive incoming UDP packets and a callback function to receive a notification when a packet is received.

A OS_FIFO is used to receive incoming UDP Packets. This function registers an OS_FIFO to listen to a specific UDP port number and a notification callback function.

Parameters
listenPortPort to listen on for incoming packets
pFifoPointer to the OS_FIFO to register
pNotifyFunctionPointer to callback function to receive notification
See also
RegisterUDPFifo(), UnregisterUDPFifo()

◆ UnregisterUDPFifo()

void UnregisterUDPFifo ( uint16_t  listenPort,
bool  drain = false 
)

Unregister a UDP FIFO.

Parameters
listenPortPort to listen on for incoming packets
pFifoPointer to the OS_FIFO to register
drainOptional. If set to true, will wait until all pool pointers are freed
See also
RegisterUDPFifo(), RegisterUDPFifoWithNotify()