qb  2.0.0.0
C++17 Actor Framework
qb Issue Watch Star Fork Follow @isndev
Loading...
Searching...
No Matches
qb::io::epoll::Proxy Class Reference

Base class for epoll operations. More...

#include <epoll.h>

Inheritance diagram for qb::io::epoll::Proxy:

Public Types

using item_type = epoll_event
 Type alias for epoll event item.

Public Member Functions

 Proxy ()=default
 Default constructor.
 Proxy (const int epoll)
 Constructor.
 Proxy (Proxy const &)=default
 Copy constructor.
int ctl (item_type &item) const
 Modify an existing file descriptor in the epoll set.
int add (item_type &item) const
 Add a new file descriptor to the epoll set.
int remove (item_type const &item)
 Remove a file descriptor from the epoll set.

Protected Attributes

int _epoll
 The epoll file descriptor.

Detailed Description

Base class for epoll operations.

This class provides basic operations for managing epoll file descriptors and controlling the monitored file descriptors.

Constructor & Destructor Documentation

◆ Proxy()

qb::io::epoll::Proxy::Proxy ( const int epoll)
inline

Constructor.

Parameters
epollAn existing epoll file descriptor

Member Function Documentation

◆ ctl()

int qb::io::epoll::Proxy::ctl ( item_type & item) const
inline

Modify an existing file descriptor in the epoll set.

Parameters
itemThe epoll event item to modify
Returns
0 on success, -1 on error

◆ add()

int qb::io::epoll::Proxy::add ( item_type & item) const
inline

Add a new file descriptor to the epoll set.

Parameters
itemThe epoll event item to add
Returns
0 on success, -1 on error

◆ remove()

int qb::io::epoll::Proxy::remove ( item_type const & item)
inline

Remove a file descriptor from the epoll set.

Parameters
itemThe epoll event item to remove
Returns
0 on success, -1 on error