send function inside client #21

Merged
aortigos merged 1 commits from client-send-function into main 2026-05-14 15:27:49 +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