/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* server.hpp :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: sben-tay +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/05/20 21:50:32 by rparodi #+# #+# */ /* Updated: 2025/06/17 17:36:46 by sben-tay ### ########.fr */ /* */ /* ************************************************************************** */ #pragma once #include #include #include "core.hpp" #include "channel.hpp" #include "user.hpp" #include "logs.hpp" class User; class Channel; class Server { private: int _port; int _serverFd; std::string _password; PollManager _pollManager; std::map _users; std::list _channels; public: Server(int port, const std::string &password); ~Server(); void start(); unsigned short int getPort() const; std::list getUsersList() const; std::list getChannelsList() const; std::string getPassword() const; void showInfo() const; void printUsers() const; void disconnectClient(int fd); };