summaryrefslogtreecommitdiffstats
path: root/src/client/user.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/user.hpp')
-rw-r--r--src/client/user.hpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/client/user.hpp b/src/client/user.hpp
index a6e6c15..45fb5e3 100644
--- a/src/client/user.hpp
+++ b/src/client/user.hpp
@@ -8,14 +8,15 @@ const int max_line_length = 156;
class Client {
int fd;
char in_buffer[max_line_length]; // мы готовим к отправке
- char in_buf_used;
+ int in_buf_used;
+
char out_buffer[max_line_length]; // нам пришло
- char out_buf_used;
- bool ignoring;
+ int out_buf_used;
+
bool exit_flag;
Client(int i_fd)
- : fd(i_fd), in_buf_used(0), out_buf_used(0), ignoring(false) { }
+ : fd(i_fd), in_buf_used(0), out_buf_used(0) { }
public:
~Client() { close(fd); }
@@ -23,6 +24,10 @@ public:
void Run(ChatRoom *room);
void HandleButton(ChatRoom *room);
+ void AddCharToBuffer(char ch);
+ void RemoveCharFromBuffer();
+ void SendMessage();
+
int getFd() const { return fd; } // not used
};