Files
webserv/includes/server/Client.hpp

45 lines
1.5 KiB
C++

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Client.hpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/04/14 14:14:39 by adjoly #+# #+# */
/* Updated: 2025/04/25 12:43:54 by mmoussou ### ########.fr */
/* */
/* ************************************************************************** */
#pragma once
#include <config/default.hpp>
#include <netinet/in.h>
#include <requests/default.hpp>
#include <server/default.hpp>
#include <webserv.hpp>
namespace webserv {
namespace server {
class Client {
public:
Client();
Client(struct pollfd, sockaddr_in, config::Config *);
void parse(struct pollfd, sockaddr_in, config::Config *);
virtual ~Client(void);
void answer(void);
private:
void _getRequest(std::string);
struct pollfd _fd;
struct sockaddr_in _client_addr;
http::IRequest *_request;
//http::Response *_response;
config::Server *_conf;
};
} // namespace server
} // namespace webserv