hello-world-cpp/task_5/socket_handler.h
2025-01-13 23:44:26 +00:00

28 lines
517 B
C++

#ifdef _WIN32
#include <windows.h>
#include <winsock2.h>
#include <ws2tcpip.h>
#include <cstring>
#else
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <unistd.h>
#include <cstring>
#endif
#include <iostream>
class SocketHandler {
public:
#ifdef _WIN32
static int working_with_client_windows(SOCKET listen_socket);
#else
static int working_with_client_unix(int listen_socket);
#endif
};