#include <fdset.hpp>
Public Member Functions | |
fdset (const fdset &)=delete | |
fdset & | operator= (const fdset &)=delete |
fdset () | |
~fdset ()=default | |
fdset (fdset &&x) noexcept | |
fdset & | operator= (fdset &&x) noexcept |
void | reset () |
bool | is_set (socket_type fd) const |
void | clear (socket_type fd) |
void | set (socket_type fd) |
socket_type | maxp1 () const |
size_t | count () const |
bool | empty () const |
fd_set * | get () |
This class represents a fd set used by the reactor class. There it is used in combination with a call to select.
matador::fdset::fdset | ( | ) |
Default constructor creates an empty fd set
|
default |
Destroys the fd set
void matador::fdset::clear | ( | socket_type | fd | ) |
Clears the giveb fd from the set.
fd | fd to clear |
size_t matador::fdset::count | ( | ) | const |
Returns the current number of fd in the set
bool matador::fdset::empty | ( | ) | const |
Checks if the set is empty
fd_set * matador::fdset::get | ( | ) |
Returns a pointer to the underlying fd_set structure
bool matador::fdset::is_set | ( | socket_type | fd | ) | const |
Checks if the given fd is set in the fd set.
fd | Requested fd |
socket_type matador::fdset::maxp1 | ( | ) | const |
Returns the highest fd plus one. This is needed for the call to select
void matador::fdset::reset | ( | ) |
Reset all bits to zero
void matador::fdset::set | ( | socket_type | fd | ) |
Sets the given fd in the fd set.
fd | fd to set |