Added a basic command parser with a temporary echo command. Can be expanded by just adding command functions to the std::map commands, Should maybe move the commands map to the Server class later
This commit is contained in:
@@ -6,16 +6,13 @@
|
||||
/* By: iherman- <iherman-@student.42malaga.com +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2026/05/06 17:18:11 by iherman- #+# #+# */
|
||||
/* Updated: 2026/05/09 21:47:58 by iherman- ### ########.fr */
|
||||
/* Updated: 2026/05/11 18:11:59 by iherman- ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef SERVER_HPP
|
||||
# define SERVER_HPP
|
||||
|
||||
// C lib functions
|
||||
|
||||
|
||||
// C++ lib functions
|
||||
# include <iostream>
|
||||
|
||||
@@ -45,7 +42,9 @@ class Server
|
||||
bool handleClient(User& client);
|
||||
|
||||
void addClient();
|
||||
std::vector<struct pollfd>::iterator removeClient(std::vector<struct pollfd>::iterator client);
|
||||
std::vector<struct pollfd>::iterator removeClient(std::vector<struct pollfd>::iterator& client);
|
||||
|
||||
void parseCommand(User& client);
|
||||
|
||||
Server(const Server& other);
|
||||
Server &operator=(const Server& other);
|
||||
|
||||
Reference in New Issue
Block a user