」 feat: implemented succecfully that f*cking pfdmanager

This commit is contained in:
2025-05-27 18:04:21 +02:00
parent cccc25fba1
commit 050643814e
17 changed files with 294 additions and 109 deletions

View File

@ -6,7 +6,7 @@
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/05/13 18:14:45 by adjoly #+# #+# */
/* Updated: 2025/05/24 11:15:25 by adjoly ### ########.fr */
/* Updated: 2025/05/27 13:08:08 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
@ -14,6 +14,7 @@
#include "server/AResource.hpp"
#include <log.hpp>
#include <unistd.h>
namespace webserv {
namespace server {
@ -22,16 +23,23 @@ class CgiIn : public AClientResource {
public:
CgiIn(std::string body, int id) : _body(body) {
log("", "CgiIn", "constructor called");
_fd->fd = id;
_fd->events = POLLOUT;
_processed = false;
_fd = id;
_pfd_event = POLLOUT;
}
~CgiIn(void) {
log("", "CgiIn", "destructor called");
close(_fd);
}
~CgiIn(void) { log("", "CgiIn", "destructor called"); }
void send(void) {
void process(void) {
_processed = true;
// TODO: send the body
}
clientResType type(void) const { return CGI_IN; }
short event(void) const { return POLLIN; }
protected:
private:
std::string _body;