libassa 3.5.1
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
ASSA::MaskSet Class Reference

#include <MaskSet.h>

Public Member Functions

void reset ()
 Clear all bits in all sets.
 
void sync ()
 Resync internals after select() call.
 
int max_fd ()
 Return maximum value of the file descriptor in the Set.
 
void dump ()
 Write current state of MaskSet object to log file.
 

Public Attributes

FdSet m_rset
 Read fds set.
 
FdSet m_wset
 Write fds set.
 
FdSet m_eset
 Exception fds set.
 

Detailed Description

Definition at line 24 of file MaskSet.h.

Member Function Documentation

◆ dump()

void ASSA::MaskSet::dump ( )
inline

Write current state of MaskSet object to log file.

Definition at line 79 of file MaskSet.h.

81{
82 DL((REACTTRACE,"+---------------------------\n"));
83 DL((REACTTRACE,"| RD FDs set %s\n", m_rset.dump_c_str ().c_str ()));
84 DL((REACTTRACE,"| WR FDs set %s\n", m_wset.dump_c_str ().c_str ()));
85 DL((REACTTRACE,"| EX FDs set %s\n", m_eset.dump_c_str ().c_str ()));
86 DL((REACTTRACE,"+---------------------------\n"));
87}
#define DL(X)
A macro for writing debug message to the Logger.
Definition Logger.h:273
std::string dump_c_str()
Return object state dump as an ASCII string.
Definition FdSet.cpp:116
FdSet m_rset
Read fds set.
Definition MaskSet.h:28
FdSet m_eset
Exception fds set.
Definition MaskSet.h:34
FdSet m_wset
Write fds set.
Definition MaskSet.h:31
@ REACTTRACE
Extended Reactor/PrioriyQueue messages
Definition LogMask.h:40

References DL, ASSA::FdSet::dump_c_str(), m_eset, m_rset, m_wset, and ASSA::REACTTRACE.

Referenced by ASSA::Reactor::dispatch(), ASSA::Reactor::isAnyReady(), ASSA::Reactor::registerIOHandler(), ASSA::Reactor::removeHandler(), ASSA::Reactor::removeIOHandler(), and ASSA::Reactor::waitForEvents().

◆ max_fd()

int ASSA::MaskSet::max_fd ( )
inline

Return maximum value of the file descriptor in the Set.

Definition at line 70 of file MaskSet.h.

72{
73 return (std::max (m_rset.maxInSet (),
74 std::max (m_wset.maxInSet (),
75 m_eset.maxInSet ())));
76}
int maxInSet()
Find out the highest file descriptor in the set.
Definition FdSet.cpp:101

References m_eset, m_rset, m_wset, and ASSA::FdSet::maxInSet().

Referenced by ASSA::Reactor::adjust_maxfdp1().

◆ reset()

void ASSA::MaskSet::reset ( )
inline

Clear all bits in all sets.

Definition at line 61 of file MaskSet.h.

63{
64 m_rset.reset ();
65 m_wset.reset ();
66 m_eset.reset ();
67}
void reset()
Reset every bit in the set (OFF).
Definition FdSet.cpp:90

References m_eset, m_rset, m_wset, and ASSA::FdSet::reset().

Referenced by ASSA::Reactor::waitForEvents().

◆ sync()

void ASSA::MaskSet::sync ( )
inline

Resync internals after select() call.

Definition at line 51 of file MaskSet.h.

53{
54 m_rset.sync ();
55 m_wset.sync ();
56 m_eset.sync ();
57}
void sync()
Sync internals after used by select(3C)
Definition FdSet.cpp:72

References m_eset, m_rset, m_wset, and ASSA::FdSet::sync().

Referenced by ASSA::Reactor::waitForEvents().

Member Data Documentation

◆ m_eset

FdSet ASSA::MaskSet::m_eset

◆ m_rset

FdSet ASSA::MaskSet::m_rset

◆ m_wset

FdSet ASSA::MaskSet::m_wset

The documentation for this class was generated from the following file: