Implement basic UDP broadcast/discovery

This commit is contained in:
2024-11-05 00:57:12 +08:00
parent 1b5e58d95a
commit 9114ea6691
3 changed files with 192 additions and 1 deletions
+16
View File
@@ -0,0 +1,16 @@
#ifndef NET_H
#define NET_H
#include <arpa/inet.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <ifaddrs.h>
int net_init(unsigned int port);
int net_broadcast();
int net_listen_clients();
int net_send();
int net_receive();
#endif