diff options
author | Joursoir <chat@joursoir.net> | 2020-11-30 02:29:18 +0300 |
---|---|---|
committer | Joursoir <chat@joursoir.net> | 2020-11-30 02:29:18 +0300 |
commit | 7385c0352c7fe7e9ceca343400a5caa5ddd999d6 (patch) | |
tree | 9f6968d4c7b646a64f36baf214fcf5af622f366d /src/client/user.hpp | |
parent | 4d4cd095cd3a2f0b65f0ed19af51c667c5941abc (diff) | |
download | want-chat-7385c0352c7fe7e9ceca343400a5caa5ddd999d6.tar.gz want-chat-7385c0352c7fe7e9ceca343400a5caa5ddd999d6.tar.bz2 want-chat-7385c0352c7fe7e9ceca343400a5caa5ddd999d6.zip |
refactoring and some feature
client: type nick in argument
server: basis for registration;
change style add commands;
edit send msg to user;
feature: private room
Diffstat (limited to 'src/client/user.hpp')
-rw-r--r-- | src/client/user.hpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/client/user.hpp b/src/client/user.hpp index 8e2218a..1ae8427 100644 --- a/src/client/user.hpp +++ b/src/client/user.hpp @@ -14,12 +14,11 @@ class Client { bool exit_flag; - Client(int i_fd) - : fd(i_fd), in_buf_used(0), out_buf_used(0) { } + Client(int i_fd, char *username); public: ~Client() { close(fd); } - static Client *Start(const char* ip, int port); + static Client *Start(const char* ip, int port, char *username); void Run(ChatRoom *room); void BreakLoop() { exit_flag = true; } void HandleButton(ChatRoom *room); |