Initial commit
This commit is contained in:
26
include/server.hpp
Normal file
26
include/server.hpp
Normal file
@@ -0,0 +1,26 @@
|
||||
#ifndef SERVER_HPP
|
||||
#define SERVER_HPP
|
||||
|
||||
#include "maze.hpp"
|
||||
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <unistd.h>
|
||||
#include <cstring>
|
||||
|
||||
const int PORT = 8080;
|
||||
const int MAX_CLIENTS = 100;
|
||||
|
||||
class Server {
|
||||
private:
|
||||
bool service_mode;
|
||||
void handle_client(int client_socket, bool _mode); // Принимает клиентский сокет
|
||||
bool check_status(Maze& maze);
|
||||
public:
|
||||
Server() : service_mode(false){};
|
||||
void start(); // Запуск сервера
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user