ft_irc/ft_irc3/includes/ClientManager.hpp
Ladebeze66 714ff9e410 test
2024-06-12 13:51:03 +02:00

58 lines
1.7 KiB
C++

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ClientManager.hpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/05/15 18:30:07 by fgras-ca #+# #+# */
/* Updated: 2024/06/12 11:03:49 by fgras-ca ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef CLIENTMANAGER_HPP
#define CLIENTMANAGER_HPP
#include "Client.hpp"
#include "Channel.hpp"
#include "Server.hpp"
#include "CommandHandler.hpp"
#include "RPL.hpp"
#include "Utils.hpp"
#include "BotFilter.hpp"
#include <poll.h>
#include <sys/socket.h>
#include <unistd.h>
#include <cstring>
#include <sstream>
#include <algorithm>
#include <fcntl.h>
#include <iostream>
#include <netdb.h>
#include <arpa/inet.h>
#include <fstream>
#include <map>
#include <vector>
class Server;
class Client;
class BotFilter;
class ClientManager
{
public:
ClientManager(Server *server);
~ClientManager();
void acceptClient();
void handleClientNext(int client_fd, char * buffer, int bytes_received);
void handleClient(int client_fd);
void removeClient(int client_fd);
private:
Server *_server;
BotFilter *_botFilter;
};
#endif