udp

package
v0.0.0-...-a33ea14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2024 License: GPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartUdpServer

func StartUdpServer(addr *net.UDPAddr, allowList []string, buf io.Writer) error

StartUdpServer starts a UDP server listening on the specified address and writes received data to the provided io.Writer. It continuously listens for incoming UDP packets and checks if the client's IP address is authorized. If the client is authorized, the received data is written to the provided io.Writer. If the client is not authorized, a warning message is logged and the server continues listening for incoming packets. If an error occurs while starting the server or reading UDP data, it is logged and returned as an error.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL