28 lines
517 B
C++
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
|
|
};
|
|
|