mirror of
https://github.com/KeyZox71/webserv.git
synced 2025-06-25 09:33:36 +02:00
「✨」 feat: implemented succecfully that f*cking pfdmanager
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user