You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
479 B

2 years ago
#pragma once
#include "webserv.hpp"
typedef std::map< string, std::vector< string > > request_t;
class Client {
int _fd;
Master *_parent;
string _header;
string _content;
request_t _request;
public:
Client(int fd, Master *parent);
~Client(void);
bool getRequest(string paquet);
bool parseHeader();
int answer(Env *env);
void call_cgi(string cgi, string path);
void send_404();
void send_answer(string msg);
bool waitHeader();
friend class Master;
};