feat: done boolean + response to char *

This commit is contained in:
3lswear
2022-02-05 15:06:28 +03:00
parent d37f013069
commit b243ca893b
3 changed files with 50 additions and 28 deletions

View File

@@ -6,6 +6,7 @@
#include "ServerConfig.hpp"
#include "Request.hpp"
#include "Response.hpp"
#include <cstring>
class Client
{
@@ -25,6 +26,7 @@ private:
std::string _bodyToSend;
std::string _headerToSend;
std::string _toSend;
char *_to_send_char;
std::map<std::string, std::string> _errorCode;
public:
@@ -39,11 +41,13 @@ public:
int serverfd;
size_t readn;
size_t left;
bool done;
size_t response_len;
public:
Request getRequest(void);
Response getResponse(void);
std::string getStrToSend(void);
char *getStrToSend(void);
unsigned int getCounter(void) const;
void setRawData(char *);
void setFd(int);