From 307e0abeac24a1e2df3d59aa92e1d8007497e7a3 Mon Sep 17 00:00:00 2001 From: 3lswear Date: Sun, 30 Jan 2022 13:54:03 +0300 Subject: [PATCH] feat: allRead --- src/Client/Client.cpp | 6 +++++- src/Client/Client.hpp | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Client/Client.cpp b/src/Client/Client.cpp index 7fa2eb6..af1e0b9 100644 --- a/src/Client/Client.cpp +++ b/src/Client/Client.cpp @@ -4,12 +4,14 @@ Client::Client() { + allRead = false; this->_fd = -1; this->_sended = 0; } Client::Client(char *str) { + allRead = false; this->_fd = -1; this->_buff = str; this->_sended = 0; @@ -18,6 +20,7 @@ Client::Client(char *str) Client::Client(char *str, ServerConfig *config) { + allRead = false; this->_fd = -1; this->_config = config; this->_buff = str; @@ -150,7 +153,8 @@ void Client::printClientInfo(void) std::cout << PINK << it->first << BLUE << it->second << ZERO_C << std::endl; } std::cout << TURGUOISE << "Client BODY" << ZERO_C << std::endl; - std::cout << BLUE << _request.getBody() << ZERO_C << std::endl; + std::cout << BLUE << _request.getBody().size() << ZERO_C << std::endl; + /* std::cout << BLUE << _request.getBody() << ZERO_C << std::endl; */ } diff --git a/src/Client/Client.hpp b/src/Client/Client.hpp index 503bf6f..6c74706 100644 --- a/src/Client/Client.hpp +++ b/src/Client/Client.hpp @@ -25,6 +25,9 @@ private: std::string _headerToSend; std::string _toSend; std::map _errorCode; + +public: + bool allRead; public: Request getRequest(void); @@ -35,6 +38,7 @@ public: void setFd(int); int getFd(void); + public: int parseRequest(void);