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
Showing only changes of commit 86d1386b8e - Show all commits

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