This commit is contained in:
Samy Ben Tayeb 2025-05-20 16:57:35 +02:00
parent 53a83308de
commit 005995fac2
6 changed files with 270 additions and 118 deletions

View file

@ -0,0 +1,22 @@
#pragma once
#include <map>
#include <vector>
#include <string>
class PollManager {
public:
PollManager();
~PollManager();
void addClient(int fd);
void removeClient(int fd);
void updateServer(int fd);
void pollLoop(int server_fd);
private:
std::vector<struct pollfd> _fds;
std::map<int, std::string> _buffers;
};