Made the commands_ map be a Server attribute

This commit is contained in:
iherman-
2026-05-12 20:02:32 +02:00
parent 644dbe92a8
commit 3578bd5b5c
2 changed files with 22 additions and 18 deletions

View File

@@ -6,7 +6,7 @@
/* By: iherman- <iherman-@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2026/05/06 17:18:11 by iherman- #+# #+# */
/* Updated: 2026/05/11 18:11:59 by iherman- ### ########.fr */
/* Updated: 2026/05/12 19:57:32 by iherman- ### ########.fr */
/* */
/* ************************************************************************** */
@@ -39,6 +39,8 @@ class Server
std::vector<struct pollfd> sockets_;
std::map<int, User> clients_;
std::map<std::string, void (*)(User&, std::istringstream&)> commands_;
bool handleClient(User& client);
void addClient();