Merge pull request 'send function inside client' (#21) from client-send-function into main

Reviewed-on: http://gitea.hadi.es/aortigos/ft_irc/pulls/21
This commit is contained in:
2026-05-14 15:27:48 +00:00
2 changed files with 7 additions and 0 deletions

View File

@@ -53,6 +53,12 @@ User::~User()
// std::cout << "User destructor called" << std::endl; // std::cout << "User destructor called" << std::endl;
} }
void User::send(const std::string &msg)
{
::send(fd, msg.c_str(), msg.size(), 0);
}
// Getters // Getters
int User::getFd() const { return (this->fd); } int User::getFd() const { return (this->fd); }

View File

@@ -34,6 +34,7 @@ class User
User& operator=(const User &other); User& operator=(const User &other);
~User(); ~User();
void send(const std::string &msg);
// Getters // Getters