Client class added

This commit is contained in:
aortigos
2026-04-16 21:56:28 +02:00
parent 4770d79418
commit b925cc74c7
4 changed files with 72 additions and 1 deletions

33
Client/Client.cpp Normal file
View File

@@ -0,0 +1,33 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Client.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: aortigos <aortigos@student.42malaga.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2026/04/13 22:31:44 by aortigos #+# #+# */
/* Updated: 2026/04/13 22:31:44 by aortigos ### ########.fr */
/* */
/* ************************************************************************** */
#include "Client.hpp"
//////////////////
// Constructors //
//////////////////
Client::Client()
{
std::cout << "Client default constructor called" << std::endl;
}
Client::Client(int fd) : fd(fd), registered(false), authenticated(false)
{
std::cout << "Client will use fd: " << fd << std::endl;
}
Client::~Client()
{
std::cout << "Client destructor called" << std::endl;
}

36
Client/Client.hpp Normal file
View File

@@ -0,0 +1,36 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Client.hpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: aortigos <aortigos@student.42malaga.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2026/04/13 22:31:44 by aortigos #+# #+# */
/* Updated: 2026/04/13 22:31:44 by aortigos ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef CLIENT_HPP
# define CLIENT_HPP
# include <iostream>
# include <string>
class Client
{
private:
int fd;
std::string nick;
std::string username;
std::string realname;
std::string buffer;
bool registered;
bool authenticated;
public:
Client();
Client(int fd);
~Client();
};
#endif