ZNC  trunk
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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_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 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 ( 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.

virtual CSListener::~CSListener ( )
inlinevirtual

Member Function Documentation

CSSockAddr::EAFRequire CSListener::GetAFRequire ( ) const
inline
const CS_STRING& CSListener::GetBindHost ( ) const
inline
const CS_STRING& CSListener::GetCipher ( ) const
inline
bool CSListener::GetDetach ( ) const
inline
bool CSListener::GetIsSSL ( ) const
inline
int CSListener::GetMaxConns ( ) const
inline
const CS_STRING& CSListener::GetPemLocation ( ) const
inline
const CS_STRING& CSListener::GetPemPass ( ) const
inline
uint16_t CSListener::GetPort ( ) const
inline
uint32_t CSListener::GetRequireClientCertFlags ( ) const
inline
const CS_STRING& CSListener::GetSockName ( ) const
inline
uint32_t CSListener::GetTimeout ( ) const
inline
void CSListener::SetAFRequire ( CSSockAddr::EAFRequire  iAFRequire)
inline

sets the AF family type required

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

void CSListener::SetBindHost ( const CS_STRING sBindHost)
inline

sets the host to bind to

void CSListener::SetCipher ( const CS_STRING s)
inline

set the cipher strength to use, default is HIGH

void CSListener::SetDetach ( bool  b)
inline
void CSListener::SetIsSSL ( bool  b)
inline

set to true to enable SSL

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

void CSListener::SetMaxConns ( int  i)
inline

set max connections as called by accept()

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

void CSListener::SetPemLocation ( const CS_STRING s)
inline

set the location of the pemfile

void CSListener::SetPemPass ( const CS_STRING s)
inline

set the pemfile pass

void CSListener::SetPort ( uint16_t  iPort)
inline

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

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

void CSListener::SetRequiresClientCert ( bool  b)
inline

set to true if require a client certificate (deprecated

See Also
SetRequireClientCertFlags)
void CSListener::SetSockName ( const CS_STRING sSockName)
inline

sets the sock name for later reference (ie FindSockByName)

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

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: