send function inside client

This commit is contained in:
2026-05-14 17:27:26 +02:00
parent f1f742959c
commit 86d1386b8e
2 changed files with 7 additions and 0 deletions

View File

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

View File

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