NetBurner 3.5.0
PDF Version |
|
The NetBurner UDP protocol API is implemented in two ways: More...
Topics | |
UDP Error Codes | |
Classes | |
class | UDPPacket |
UDP Packet Class. More... | |
Functions | |
bool | RegisterUDPFifo (uint16_t listenPort, OS_FIFO *pFifo) |
Register a FIFO to receive incoming UDP packets. | |
bool | RegisterUDPFifoVia (uint16_t listenPort, OS_FIFO *pFifo, int interface) |
Register a FIFO to receive incoming UDP packets on the specified network interface. | |
uint16_t | RegisterEphemeralFifo (OS_FIFO *pfifo, int ifn=-1) |
Register a UDP FIFO with a random port number to receive incoming UDP packets. | |
bool | 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. | |
bool | RegisterUDPFifoWithNotifyVia (uint16_t listenPort, OS_FIFO *pFifo, udp_data_notify *pNotifyFunction, int interface) |
Register a FIFO to receive incoming UDP packets and a callback function to receive a notification when a packet is received. Same as RegisterUDPFifoWithNotify() with the additional parameter to specify the local network interface. | |
void | UnregisterUDPFifo (uint16_t listenPort, bool drain=false) |
Unregister a UDP FIFO. | |
The NetBurner UDP protocol API is implemented in two ways:
#include< udp.h >
uint16_t RegisterEphemeralFifo | ( | OS_FIFO * | pfifo, |
int | ifn = -1 ) |
#include <udp.h>
Register a UDP FIFO with a random port number to receive incoming UDP packets.
A OS_FIFO is used to receive incoming UDP Packets. This function registers an OS_FIFO to listen on a random unused UDP port number, which can be useful when sending a UDP packet to a remote host that will respond to the received packet source port number.
pfifo | Pointer to the OS_FIFO to register |
ifn | Optional local interface number to listen on |
bool RegisterUDPFifo | ( | uint16_t | listenPort, |
OS_FIFO * | pFifo ) |
#include <udp.h>
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.
listenPort | Port to listen on for incoming packets |
pFifo | Pointer to the OS_FIFO to register |
bool RegisterUDPFifoVia | ( | uint16_t | listenPort, |
OS_FIFO * | pFifo, | ||
int | interface ) |
#include <udp.h>
Register a FIFO to receive incoming UDP packets on the specified network interface.
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 local network interface.
listenPort | Port to listen on for incoming packets |
pFifo | Pointer to the OS_FIFO to register |
interface | Local network interface number |
bool RegisterUDPFifoWithNotify | ( | uint16_t | listenPort, |
OS_FIFO * | pFifo, | ||
udp_data_notify * | pNotifyFunction ) |
#include <udp.h>
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.
listenPort | Port to listen on for incoming packets |
pFifo | Pointer to the OS_FIFO to register |
pNotifyFunction | Pointer to callback function to receive notification |
bool RegisterUDPFifoWithNotifyVia | ( | uint16_t | listenPort, |
OS_FIFO * | pFifo, | ||
udp_data_notify * | pNotifyFunction, | ||
int | interface ) |
#include <udp.h>
Register a FIFO to receive incoming UDP packets and a callback function to receive a notification when a packet is received. Same as RegisterUDPFifoWithNotify() with the additional parameter to specify the local network interface.
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.
listenPort | Port to listen on for incoming packets |
pFifo | Pointer to the OS_FIFO to register |
pNotifyFunction | Pointer to callback function to receive notification |
interface | Local network interface number |
void UnregisterUDPFifo | ( | uint16_t | listenPort, |
bool | drain = false ) |
#include <udp.h>
Unregister a UDP FIFO.
listenPort | Port to listen on for incoming packets. |
drain | Optional, default if false. If set to true, will free all queued pool pointers. |