Client class now has getters and setters, and server has 4 functions for main loop

This commit is contained in:
aortigos
2026-04-16 22:28:47 +02:00
parent b925cc74c7
commit 00a08b4f30
5 changed files with 139 additions and 56 deletions

View File

@@ -22,16 +22,27 @@
# include <poll.h>
# include "../Client/Client.hpp"
# include <map>
class Server
{
private:
int port;
int port;
std::string password;
int server_fd;
std::vector<pollfd> fds;
std::map<int, Client> clients;
void acceptClient();
void readClient(int fd);
void removeClient(int fd);
public:
Server();
Server(int port);
Server(int port, std::string password);
~Server();
int run();
};
#endif