|
ZNC trunk
|
Class to tie sockets to for monitoring by Csocket at either the Csock or TSockManager. More...
#include <Csocket.h>
Public Member Functions | |
| CSMonitorFD () | |
| virtual | ~CSMonitorFD () |
| virtual bool | GatherFDsForSelect (std::map< cs_sock_t, short > &miiReadyFds, long &iTimeoutMS) |
| called before select, typically you don't need to reimplement this just add sockets via Add and let the default implementation have its way | |
| virtual bool | FDsThatTriggered (const std::map< cs_sock_t, short > &miiReadyFds) |
| called when there are fd's belonging to this class that have triggered | |
| virtual bool | CheckFDs (const std::map< cs_sock_t, short > &miiReadyFds) |
| gets called to diff miiReadyFds with m_miiMonitorFDs, and calls FDsThatTriggered when appropriate. | |
| void | Add (cs_sock_t iFD, short iMonitorEvents) |
| adds a file descriptor to be monitored | |
| void | Remove (cs_sock_t iFD) |
| removes this fd from monitoring | |
| void | DisableMonitor () |
| causes this monitor to be removed | |
| bool | IsEnabled () const |
Protected Attributes | |
| std::map< cs_sock_t, short > | m_miiMonitorFDs |
| bool | m_bEnabled |
Class to tie sockets to for monitoring by Csocket at either the Csock or TSockManager.
|
inline |
References m_bEnabled.
|
inlinevirtual |
|
inline |
adds a file descriptor to be monitored
| iFD | the file descriptor |
| iMonitorEvents | bitset of events to monitor for ( |
References m_miiMonitorFDs.
|
virtual |
gets called to diff miiReadyFds with m_miiMonitorFDs, and calls FDsThatTriggered when appropriate.
Typically you don't need to reimplement this.
| miiReadyFds | the map of all triggered fd's, not just the fd's from this class |
|
inline |
causes this monitor to be removed
References m_bEnabled.
|
inlinevirtual |
called when there are fd's belonging to this class that have triggered
| miiReadyFds | the map of fd's with the bits that triggered them ( |
|
virtual |
called before select, typically you don't need to reimplement this just add sockets via Add and let the default implementation have its way
| miiReadyFds | fill with fd's to monitor and the associated bit to check them for ( |
| iTimeoutMS | the timeout to change to, setting this to -1 (the default) |
|
inline |
References m_bEnabled.
|
inline |
removes this fd from monitoring
References m_miiMonitorFDs.
|
protected |
Referenced by CSMonitorFD(), DisableMonitor(), and IsEnabled().
|
protected |