add: config support in client and Response class

This commit is contained in:
Talyx
2022-02-06 22:07:56 +03:00
parent 09c0fbf3a9
commit 0985335d14
4 changed files with 172 additions and 33 deletions

View File

@@ -6,6 +6,7 @@
#include "ServerConfig.hpp"
#include "Request.hpp"
#include "Response.hpp"
#include "Config.hpp"
#include <cstring>
class Client
@@ -18,7 +19,7 @@ private:
private:
int _ret;
int _fd;
struct timeval _time;
struct timeval _time;
unsigned int _sended;
char *_buff;
@@ -71,13 +72,13 @@ public:
void increaseCounter(void);
void increaseRecvCounter(unsigned int n);
std::string generateRespons(void);
std::string generateRespons(serverListen &, std::vector<ServerConfig *> &);
Client();
Client(char *);
Client(char *, ServerConfig *config);
~Client();
};
#endif