Fixed issues with Udp win code

This commit is contained in:
Pascal Serrarens 2025-01-11 09:17:29 +01:00
parent 1076f7673d
commit 18d6ea762c
2 changed files with 13 additions and 0 deletions

View File

@ -5,6 +5,7 @@
#define BUF_SIZE 1024
#include "UdpArduino.h"
#include "UdpWindows.h"
#if defined(_WIN32) || defined(_WIN64)
#include <winsock2.h>

View File

@ -1,5 +1,17 @@
#include "UdpWindows.h"
#if defined(_WIN32) || defined(_WIN64)
#include <winsock2.h>
#include <ws2tcpip.h>
#pragma comment(lib, "ws2_32.lib")
#elif defined(__unix__) || defined(__APPLE__)
#include <arpa/inet.h>
#include <fcntl.h> // For fcntl
#include <netinet/in.h>
#include <sys/socket.h>
#include <unistd.h>
#endif
namespace Passer {
namespace Control {