#include <select_fdsets.hpp>
Public Types | |
| enum | fdset_type { read_type = 0 , write_type = 1 , except_type } |
Public Member Functions | |
| socket_type | maxp1 () const |
| fdset & | fd_set (fdset_type type) |
| fdset & | read_set () |
| const fdset & | read_set () const |
| fdset & | write_set () |
| const fdset & | write_set () const |
| fdset & | except_set () |
| const fdset & | except_set () const |
| void | reset () |
| void | reset (fdset_type type) |
| bool | is_set (fdset_type type, int fd) const |
| void | clear (fdset_type type, int fd) |
| void | set (fdset_type type, int fd) |
This class represents three fd sets needed for the system call to select.
| void matador::select_fdsets::clear | ( | fdset_type | type, |
| int | fd | ||
| ) |
Clears the given fd is set in the fdset identified by the given type.
| type | Requested fd set type |
| fd | fd to clear |
| fdset & matador::select_fdsets::except_set | ( | ) |
Returns the exceptional fd set.
| const fdset & matador::select_fdsets::except_set | ( | ) | const |
Returns the exceptional fd set.
| fdset & matador::select_fdsets::fd_set | ( | fdset_type | type | ) |
Returns the fdset identified by the given type
| type | Requested fdset type |
| bool matador::select_fdsets::is_set | ( | fdset_type | type, |
| int | fd | ||
| ) | const |
Checks if the given fd is set in the fdset identified by the given type. If fd is set true returned.
| type | Requested fd set type |
| fd | fd to check |
| socket_type matador::select_fdsets::maxp1 | ( | ) | const |
Returns the highest fd value over all three fd sets plus one. This is used by the system call to select.
| fdset & matador::select_fdsets::read_set | ( | ) |
Returns the read fd set.
| const fdset & matador::select_fdsets::read_set | ( | ) | const |
Returns the read fd set.
| void matador::select_fdsets::reset | ( | ) |
Reset all bits in all three sets to zero
| void matador::select_fdsets::reset | ( | fdset_type | type | ) |
Resets the fd set identified by the given type
| type | Type of set to reset |
| void matador::select_fdsets::set | ( | fdset_type | type, |
| int | fd | ||
| ) |
Sets the bit for the given fd is set in the fdset identified by the given type.
| type | Requested fd set type |
| fd | fd to set |
| fdset & matador::select_fdsets::write_set | ( | ) |
Returns the write fd set.
| const fdset & matador::select_fdsets::write_set | ( | ) | const |
Returns the write fd set.