Receive and send messages

This commit is contained in:
Torsten Schulz
2017-07-21 21:49:19 +02:00
parent 922ee7ac12
commit b5b4c94f65
10 changed files with 144 additions and 44 deletions

5
room.h
View File

@@ -16,10 +16,11 @@ namespace Yc {
{
public:
Room(Server *parent, std::string name, std::string password = "", std::vector<std::string> allowedUsers = std::vector<std::string>());
~Room();
void run();
std::string name();
bool addUser(std::string userName, std::string color, std::string password, int socket);
bool addUser(User user, std::string password);
bool addUser(User *user, std::string password);
bool userNameExists(std::string userName);
void removeUser(std::string _token);
void setStop();
@@ -36,7 +37,7 @@ namespace Yc {
std::string _name;
std::string _password;
std::vector<std::string> _allowedUsers;
std::vector<User> _users;
std::vector<User*> _users;
bool _blocked;
bool _stop;
std::queue<Message> _msgQueue;