🏗️」 wip: redone correctly ResourceManager and commentary

This commit is contained in:
2025-05-13 10:07:35 +02:00
parent 07201b9d8a
commit b234a23101
2 changed files with 48 additions and 16 deletions

View File

@ -6,7 +6,7 @@
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/04/29 14:20:09 by mmoussou #+# #+# */
/* Updated: 2025/05/12 19:05:51 by adjoly ### ########.fr */
/* Updated: 2025/05/13 09:56:02 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
@ -18,12 +18,17 @@
namespace webserv {
namespace server {
enum clientResType {
CGI,
UP_FILE
};
class AClientResource {
public:
virtual ~AClientResource() {}
bool operator==(int i) const {
if (i == _client_id)
if (i == _res_id)
return true;
return false;
}
@ -31,10 +36,12 @@ public:
void addFileDescriptor(struct pollfd fd);
struct pollfd getFileDescriptor();
private:
virtual clientResType type(void);
protected:
struct pollfd _fd;
int _client_id;
int _res_id;
};