2025-01-13 02:35:49 +10:00
|
|
|
#ifdef _WIN32
|
|
|
|
#include <windows.h>
|
|
|
|
#include <winsock2.h>
|
|
|
|
#include <ws2tcpip.h>
|
|
|
|
#include <cstring>
|
|
|
|
#else
|
|
|
|
#include <sys/socket.h>
|
2025-01-13 23:44:26 +00:00
|
|
|
#include <sys/types.h>
|
|
|
|
#include <netinet/in.h>
|
|
|
|
#include <netinet/ip.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <cstring>
|
2025-01-13 02:35:49 +10:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
|
|
|
|
class SocketUp {
|
|
|
|
public:
|
2025-01-13 23:44:26 +00:00
|
|
|
#ifdef _WIN32
|
|
|
|
static SOCKET config_socket_windows();
|
|
|
|
#else
|
|
|
|
static int config_socket_unix();
|
|
|
|
#endif
|
2025-01-13 02:35:49 +10:00
|
|
|
};
|
|
|
|
|