#include <FdSet.h>
Public Member Functions | |
FdSet () | |
Constructor. | |
~FdSet () | |
Destructor. | |
bool | setFd (const unsigned int fd_) |
Set flag (ON) for the argument fd. | |
bool | clear (const unsigned int fd_) |
Clear flag (OFF) for the argument fd. | |
bool | isSet (const unsigned int fd_) |
Test whether fd's flag is on. | |
void | reset (void) |
Reset every bit in set (OFF). | |
int | numSet () |
Determine how many bits are set (ON) in the set. | |
void | dump (void) |
Write to debug log all bits set. |
Wrapper around struct fd_set
Definition at line 35 of file FdSet.h.
|
Constructor.
Definition at line 80 of file FdSet.h. References reset(). 00081 { 00082 reset (); 00083 }
|
|
Destructor.
Definition at line 44 of file FdSet.h.
|
|
Clear flag (OFF) for the argument fd.
Definition at line 98 of file FdSet.h. Referenced by ASSA::Reactor::checkFDs(), ASSA::Reactor::dispatchHandler(), and ASSA::Reactor::removeIOHandler(). 00099 { 00100 if ( fd_ <= FD_SETSIZE ) { 00101 FD_CLR (fd_, this); 00102 return true; 00103 } 00104 return false; 00105 }
|
|
Write to debug log all bits set.
Definition at line 137 of file FdSet.h. References DL, isSet(), and ASSA::REACT. Referenced by ASSA::MaskSet::dump(). 00138 { 00139 for (int i=0; i< FD_SETSIZE; i++) { 00140 if ( isSet (i) ) { 00141 DL((REACT,"fd # %d\n",i)); 00142 } 00143 } 00144 }
|
|
Test whether fd's flag is on.
Definition at line 109 of file FdSet.h. Referenced by ASSA::Reactor::dispatchHandler(), dump(), and numSet().
|
|
Determine how many bits are set (ON) in the set.
Definition at line 123 of file FdSet.h. References isSet(). Referenced by ASSA::Reactor::isAnyReady(). 00124 { 00125 register int i, n; 00126 00127 for (i=0, n=0; i < FD_SETSIZE; i++) { 00128 if ( isSet (i) ) { 00129 n++; 00130 } 00131 } 00132 return n; 00133 }
|
|
Reset every bit in set (OFF).
Definition at line 116 of file FdSet.h. Referenced by FdSet(), ASSA::Acceptor< SERVICE_HANDLER, PEER_ACCEPTOR >::handle_read(), and ASSA::MaskSet::reset().
|
|
Set flag (ON) for the argument fd.
Definition at line 87 of file FdSet.h. Referenced by ASSA::Reactor::checkFDs(), ASSA::Acceptor< SERVICE_HANDLER, PEER_ACCEPTOR >::handle_read(), and ASSA::Reactor::registerIOHandler(). 00088 { 00089 if ( fd_ <= FD_SETSIZE ) { 00090 FD_SET (fd_, this); 00091 return true; 00092 } 00093 return false; 00094 }
|