ZNC  trunk
Public Member Functions | List of all members
CSListener Class Reference

options container to create a listener More...

#include <Csocket.h>

+ Inheritance diagram for CSListener:

Public Member Functions

 CSListener (uint16_t iPort, const CS_STRING &sBindHost="", bool bDetach=false)
 
virtual ~CSListener ()
 
void SetDetach (bool b)
 
bool GetDetach () const
 
uint16_t GetPort () const
 
const CS_STRINGGetSockName () const
 
const CS_STRINGGetBindHost () const
 
bool GetIsSSL () const
 
int GetMaxConns () const
 
uint32_t GetTimeout () const
 
CSSockAddr::EAFRequire GetAFRequire () const
 
const CS_STRINGGetCipher () const
 
const CS_STRINGGetDHParamLocation () const
 
const CS_STRINGGetKeyLocation () const
 
const CS_STRINGGetPemLocation () const
 
const CS_STRINGGetPemPass () const
 
uint32_t GetRequireClientCertFlags () const
 
void SetPort (uint16_t iPort)
 sets the port to listen on. Set to 0 to listen on a random port More...
 
void SetSockName (const CS_STRING &sSockName)
 sets the sock name for later reference (ie FindSockByName) More...
 
void SetBindHost (const CS_STRING &sBindHost)
 sets the host to bind to More...
 
void SetIsSSL (bool b)
 set to true to enable SSL More...
 
void SetMaxConns (int i)
 set max connections as called by accept() More...
 
void SetTimeout (uint32_t i)
 sets the listen timeout. The listener class will close after timeout has been reached if not 0 More...
 
void SetAFRequire (CSSockAddr::EAFRequire iAFRequire)
 sets the AF family type required More...
 
void SetCipher (const CS_STRING &s)
 set the cipher strength to use, default is HIGH More...
 
void SetPemLocation (const CS_STRING &s)
 set the location of the pemfile More...
 
void SetKeyLocation (const CS_STRING &s)
 set the location of the keyfile More...
 
void SetDHParamLocation (const CS_STRING &s)
 set the location of the dhparamfile More...
 
void SetPemPass (const CS_STRING &s)
 set the pemfile pass More...
 
void SetRequiresClientCert (bool b)
 set to true if require a client certificate (deprecated More...
 
void SetRequireClientCertFlags (unsigned int iRequireCertFlags)
 bitwise flags, 0 means don't require cert, SSL_VERIFY_PEER verifies peers, SSL_VERIFY_FAIL_IF_NO_PEER_CERT will cause the connection to fail if no cert More...
 

Detailed Description

options container to create a listener

Constructor & Destructor Documentation

◆ CSListener()

CSListener::CSListener ( uint16_t  iPort,
const CS_STRING sBindHost = "",
bool  bDetach = false 
)
inline
Parameters
iPortport to listen on. Set to 0 to listen on a random port
sBindHosthost to bind to
bDetachdon't block while waiting for the port to come up, instead detach and return immediately

References CSSockAddr::RAF_ANY.

◆ ~CSListener()

virtual CSListener::~CSListener ( )
inlinevirtual

Member Function Documentation

◆ GetAFRequire()

CSSockAddr::EAFRequire CSListener::GetAFRequire ( ) const
inline

◆ GetBindHost()

const CS_STRING& CSListener::GetBindHost ( ) const
inline

◆ GetCipher()

const CS_STRING& CSListener::GetCipher ( ) const
inline

◆ GetDetach()

bool CSListener::GetDetach ( ) const
inline

◆ GetDHParamLocation()

const CS_STRING& CSListener::GetDHParamLocation ( ) const
inline

◆ GetIsSSL()

bool CSListener::GetIsSSL ( ) const
inline

◆ GetKeyLocation()

const CS_STRING& CSListener::GetKeyLocation ( ) const
inline

◆ GetMaxConns()

int CSListener::GetMaxConns ( ) const
inline

◆ GetPemLocation()

const CS_STRING& CSListener::GetPemLocation ( ) const
inline

◆ GetPemPass()

const CS_STRING& CSListener::GetPemPass ( ) const
inline

◆ GetPort()

uint16_t CSListener::GetPort ( ) const
inline

◆ GetRequireClientCertFlags()

uint32_t CSListener::GetRequireClientCertFlags ( ) const
inline

◆ GetSockName()

const CS_STRING& CSListener::GetSockName ( ) const
inline

◆ GetTimeout()

uint32_t CSListener::GetTimeout ( ) const
inline

◆ SetAFRequire()

void CSListener::SetAFRequire ( CSSockAddr::EAFRequire  iAFRequire)
inline

sets the AF family type required

Referenced by CSockManager::ListenHost(), and CSockManager::ListenRand().

◆ SetBindHost()

void CSListener::SetBindHost ( const CS_STRING sBindHost)
inline

sets the host to bind to

◆ SetCipher()

void CSListener::SetCipher ( const CS_STRING s)
inline

set the cipher strength to use, default is HIGH

◆ SetDetach()

void CSListener::SetDetach ( bool  b)
inline

◆ SetDHParamLocation()

void CSListener::SetDHParamLocation ( const CS_STRING s)
inline

set the location of the dhparamfile

◆ SetIsSSL()

void CSListener::SetIsSSL ( bool  b)
inline

set to true to enable SSL

Referenced by CSockManager::ListenHost(), and CSockManager::ListenRand().

◆ SetKeyLocation()

void CSListener::SetKeyLocation ( const CS_STRING s)
inline

set the location of the keyfile

◆ SetMaxConns()

void CSListener::SetMaxConns ( int  i)
inline

set max connections as called by accept()

Referenced by CSockManager::ListenHost(), and CSockManager::ListenRand().

◆ SetPemLocation()

void CSListener::SetPemLocation ( const CS_STRING s)
inline

set the location of the pemfile

◆ SetPemPass()

void CSListener::SetPemPass ( const CS_STRING s)
inline

set the pemfile pass

◆ SetPort()

void CSListener::SetPort ( uint16_t  iPort)
inline

sets the port to listen on. Set to 0 to listen on a random port

◆ SetRequireClientCertFlags()

void CSListener::SetRequireClientCertFlags ( unsigned int  iRequireCertFlags)
inline

bitwise flags, 0 means don't require cert, SSL_VERIFY_PEER verifies peers, SSL_VERIFY_FAIL_IF_NO_PEER_CERT will cause the connection to fail if no cert

◆ SetRequiresClientCert()

void CSListener::SetRequiresClientCert ( bool  b)
inline

set to true if require a client certificate (deprecated

See also
SetRequireClientCertFlags)

◆ SetSockName()

void CSListener::SetSockName ( const CS_STRING sSockName)
inline

sets the sock name for later reference (ie FindSockByName)

Referenced by CSockManager::ListenHost(), and CSockManager::ListenRand().

◆ SetTimeout()

void CSListener::SetTimeout ( uint32_t  i)
inline

sets the listen timeout. The listener class will close after timeout has been reached if not 0

Referenced by CSockManager::ListenHost(), and CSockManager::ListenRand().


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