proto
This commit is contained in:
parent
53a83308de
commit
005995fac2
6 changed files with 270 additions and 118 deletions
22
include/core/PollManager.hpp
Normal file
22
include/core/PollManager.hpp
Normal 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;
|
||||
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue