」 feat(Resource): added resource abstract class :D

This commit is contained in:
y-syo
2025-04-29 14:59:21 +02:00
parent 42758d150c
commit 5a22af3c5a
2 changed files with 76 additions and 0 deletions

42
src/server/Resource.cpp Normal file
View File

@ -0,0 +1,42 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Resource.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/04/29 14:42:01 by mmoussou #+# #+# */
/* Updated: 2025/04/29 14:56:53 by mmoussou ### ########.fr */
/* */
/* ************************************************************************** */
#include <server/Resource.hpp>
/*
class ClientResource {
public:
virtual void handleResource() = 0;
virtual ~HttpClientResource() {}
void addFileDescriptor(int fd);
void getFileDescriptors();
private:
struct pollfd fd;
}
*/
using namespace webserv;
using namespace server;
void ClientResource::addFileDescriptor(struct pollfd fd)
{
this->_fd = fd;
}
struct pollfd ClientResource::getFileDescriptor()
{
return (this->_fd);
}