Changed code to support Windows libraries and functions as well

This commit is contained in:
2024-02-29 16:38:36 -05:00
parent ddbbc322a6
commit 4b3d5387a1
6 changed files with 55 additions and 30 deletions

View File

@@ -2,7 +2,13 @@
#define _SOCK_CLASS
#include <string>
#include <sys/socket.h>
#ifdef linux
#include <sys/socket.h>
#endif
#ifdef _WIN32
#include <winsock2.h>
#include <ws2tcpip.h>
#endif
/* Global constants - can be used by children classes as return values, and by any clients to check what type the socket is of */
const int SOCK_CLIENT = 'C';