send function inside client
This commit is contained in:
@@ -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); }
|
||||
|
||||
@@ -34,6 +34,7 @@ class User
|
||||
User& operator=(const User &other);
|
||||
~User();
|
||||
|
||||
void send(const std::string &msg);
|
||||
|
||||
// Getters
|
||||
|
||||
|
||||
Reference in New Issue
Block a user