Parser accept server functions, and first stage for implementing client.send function
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
/* ::: :::::::: */
|
||||
/* Server.hpp :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: iherman- <iherman-@student.42malaga.com +#+ +:+ +#+ */
|
||||
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2026/05/06 17:18:11 by iherman- #+# #+# */
|
||||
/* Updated: 2026/05/12 19:57:32 by iherman- ### ########.fr */
|
||||
/* Updated: 2026/05/14 16:58:31 by aortigos ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -39,7 +39,7 @@ class Server
|
||||
std::vector<struct pollfd> sockets_;
|
||||
std::map<int, User> clients_;
|
||||
|
||||
std::map<std::string, void (*)(User&, std::istringstream&)> commands_;
|
||||
std::map<std::string, void (Server::*)(User&, std::istringstream&)> commands_;
|
||||
|
||||
bool handleClient(User& client);
|
||||
|
||||
@@ -51,6 +51,10 @@ class Server
|
||||
Server(const Server& other);
|
||||
Server &operator=(const Server& other);
|
||||
|
||||
// Commands
|
||||
void pass_cmd(User &client, std::istringstream &ss);
|
||||
|
||||
|
||||
public:
|
||||
Server();
|
||||
Server(int port, const std::string& password);
|
||||
|
||||
Reference in New Issue
Block a user