ZNC trunk
Loading...
Searching...
No Matches
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
virtual void Cron ()
 This has a garbage collecter, and is used internall to call the jobs.
virtual void AddCron (CCron *pcCron)
 insert a newly created cron
virtual void DelCron (const CS_STRING &sName, bool bDeleteAll=true, bool bCaseSensitive=true)
 deletes a cron by name
virtual void DelCron (uint32_t iPos)
 delete cron by idx
virtual void DelCronByAddr (CCron *pcCron)
 delete cron by address
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

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

References CS_STRING.

◆ 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 m_vcCrons.

◆ MonitorFD()

void CSockCommon::MonitorFD ( CSMonitorFD * pMonitorFD)
inline

add an FD set to monitor

References m_vcMonitorFD.

Member Data Documentation

◆ m_vcCrons

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

Referenced by GetCrons().

◆ m_vcMonitorFD

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

Referenced by MonitorFD().


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