Merge branch 'master' into raph
This commit is contained in:
commit
520814d6bd
9 changed files with 357 additions and 225 deletions
|
|
@ -1,35 +1,36 @@
|
|||
/* ************************************************************************** */
|
||||
/******************************************************************************/
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* server.hpp :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||
/* By: omoudni <omoudni@student.42paris.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/05/20 21:50:32 by rparodi #+# #+# */
|
||||
/* Updated: 2025/05/24 16:48:04 by rparodi ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
/******************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include "PollManager.hpp"
|
||||
#include <list>
|
||||
#include "user.hpp"
|
||||
#include "channel.hpp"
|
||||
#include "core.hpp"
|
||||
|
||||
class Server {
|
||||
private:
|
||||
int _port;
|
||||
int _serverFd;
|
||||
std::string _password;
|
||||
PollManager _pollManager;
|
||||
public:
|
||||
Server(int port, const std::string &password);
|
||||
~Server();
|
||||
void start();
|
||||
std::list<User *> getUsersList() const;
|
||||
std::list<Channel *> getChannelsList() const;
|
||||
unsigned short int getPort() const;
|
||||
void showInfo() const;
|
||||
class User;
|
||||
class Server
|
||||
{
|
||||
private:
|
||||
int _port;
|
||||
int _serverFd;
|
||||
std::string _password;
|
||||
PollManager _pollManager;
|
||||
std::map<int, User *> _users;
|
||||
|
||||
public:
|
||||
Server(int port, const std::string &password);
|
||||
~Server();
|
||||
void start();
|
||||
unsigned short int getPort() const;
|
||||
std::list<User *> getUsersList() const;
|
||||
std::list<Channel *> getChannelsList() const;
|
||||
void showInfo() const;
|
||||
void printUsers() const;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue