」 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: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/04/29 14:20:09 by mmoussou #+# #+# */
/* Updated: 2025/05/24 10:09:33 by adjoly ### ########.fr */
/* Updated: 2025/05/27 13:12:03 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
@ -25,19 +25,22 @@ class AClientResource {
virtual ~AClientResource() {}
bool operator==(int i) const {
if (i == _fd->fd)
if (i == _fd)
return true;
return false;
}
void setFileDescriptor(struct pollfd *fd) { _fd = fd; }
struct pollfd getFileDescriptor(void) const { return *_fd; }
virtual clientResType type(void) const = 0;
int getId(void) const { return _fd->fd; }
int getId(void) const { return _fd; }
virtual void process(void) = 0;
bool isProcessed(void) const { return _processed; }
virtual short event(void) const = 0;
protected:
struct pollfd *_fd;
int _fd;
bool _processed;
short _pfd_event;
};
} // namespace server