#ifndef SERVER_H #define SERVER_H #include #include #include "server/network/Socket.h" #include "server/GameServer.h" class Server final { public: Server(const Socket& connectionListener, u16 maxClients, GameServer& gameServer); ~Server(); Server(const Server& other) = delete; Server& operator=(const Server& other) = delete; Server(Server&& other) = delete; Server& operator=(Server&& other) = delete; void start(); private: void listenForClients() const; const Socket& connectionListener; GameServer gameServer; std::atomic_bool running; std::thread listenerThread; }; #endif