ZNC  trunk
Public Member Functions | Protected Attributes | List of all members
CSockCommon Class Reference

simple class to share common code to both TSockManager and Csock More...

#include <Csocket.h>

+ Inheritance diagram for CSockCommon:
+ Collaboration diagram for CSockCommon:

Public Member Functions

 CSockCommon ()
 
virtual ~CSockCommon ()
 
void CleanupCrons ()
 
void CleanupFDMonitors ()
 
const std::vector< CCron * > & GetCrons () const
 returns a const reference to the crons associated to this socket More...
 
virtual void Cron ()
 This has a garbage collecter, and is used internall to call the jobs. More...
 
virtual void AddCron (CCron *pcCron)
 insert a newly created cron More...
 
virtual void DelCron (const CS_STRING &sName, bool bDeleteAll=true, bool bCaseSensitive=true)
 deletes a cron by name More...
 
virtual void DelCron (uint32_t iPos)
 delete cron by idx More...
 
virtual void DelCronByAddr (CCron *pcCron)
 delete cron by address More...
 
void CheckFDs (const std::map< cs_sock_t, short > &miiReadyFds)
 
void AssignFDs (std::map< cs_sock_t, short > &miiReadyFds, struct timeval *tvtimeout)
 
void MonitorFD (CSMonitorFD *pMonitorFD)
 add an FD set to monitor More...
 

Protected Attributes

std::vector< CCron * > m_vcCrons
 
std::vector< CSMonitorFD * > m_vcMonitorFD
 

Detailed Description

simple class to share common code to both TSockManager and Csock

Constructor & Destructor Documentation

◆ CSockCommon()

CSockCommon::CSockCommon ( )
inline

◆ ~CSockCommon()

virtual CSockCommon::~CSockCommon ( )
virtual

Member Function Documentation

◆ AddCron()

virtual void CSockCommon::AddCron ( CCron pcCron)
virtual

insert a newly created cron

◆ AssignFDs()

void CSockCommon::AssignFDs ( std::map< cs_sock_t, short > &  miiReadyFds,
struct timeval *  tvtimeout 
)

◆ CheckFDs()

void CSockCommon::CheckFDs ( const std::map< cs_sock_t, short > &  miiReadyFds)

◆ CleanupCrons()

void CSockCommon::CleanupCrons ( )

◆ CleanupFDMonitors()

void CSockCommon::CleanupFDMonitors ( )

◆ Cron()

virtual void CSockCommon::Cron ( )
virtual

This has a garbage collecter, and is used internall to call the jobs.

◆ DelCron() [1/2]

virtual void CSockCommon::DelCron ( const CS_STRING sName,
bool  bDeleteAll = true,
bool  bCaseSensitive = true 
)
virtual

deletes a cron by name

Parameters
sNamethe name of the cron
bDeleteAlldelete all crons that match sName
bCaseSensitiveuse strcmp or strcasecmp

◆ DelCron() [2/2]

virtual void CSockCommon::DelCron ( uint32_t  iPos)
virtual

delete cron by idx

◆ DelCronByAddr()

virtual void CSockCommon::DelCronByAddr ( CCron pcCron)
virtual

delete cron by address

◆ GetCrons()

const std::vector<CCron *>& CSockCommon::GetCrons ( ) const
inline

returns a const reference to the crons associated to this socket

References CS_STRING.

◆ MonitorFD()

void CSockCommon::MonitorFD ( CSMonitorFD pMonitorFD)
inline

add an FD set to monitor

Member Data Documentation

◆ m_vcCrons

std::vector<CCron *> CSockCommon::m_vcCrons
protected

◆ m_vcMonitorFD

std::vector<CSMonitorFD *> CSockCommon::m_vcMonitorFD
protected

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