vdr 2.6.8
cSVDRPServerHandler Class Reference

Public Member Functions

 cSVDRPServerHandler (int TcpPort)
 
virtual ~cSVDRPServerHandler ()
 
void WaitUntilReady (void)
 
- Public Member Functions inherited from cThread
 cThread (const char *Description=NULL, bool LowPriority=false)
 
virtual ~cThread ()
 
void SetDescription (const char *Description,...) __attribute__((format(printf
 
void bool Start (void)
 
bool Active (void)
 

Protected Member Functions

virtual void Action (void)
 
- Protected Member Functions inherited from cThread
void SetPriority (int Priority)
 
void SetIOPriority (int Priority)
 
void Lock (void)
 
void Unlock (void)
 
bool Running (void)
 
void Cancel (int WaitSeconds=0)
 

Private Member Functions

void HandleServerConnection (void)
 
void ProcessConnections (void)
 

Private Attributes

bool ready
 
cSocket tcpSocket
 
cVector< cSVDRPServer * > serverConnections
 

Additional Inherited Members

- Static Public Member Functions inherited from cThread
static tThreadId ThreadId (void)
 
static tThreadId IsMainThread (void)
 
static void SetMainThreadId (void)
 

Detailed Description

Definition at line 2748 of file svdrp.c.

Constructor & Destructor Documentation

◆ cSVDRPServerHandler()

cSVDRPServerHandler::cSVDRPServerHandler ( int TcpPort)

Definition at line 2765 of file svdrp.c.

References ready.

◆ ~cSVDRPServerHandler()

cSVDRPServerHandler::~cSVDRPServerHandler ( )
virtual

Definition at line 2772 of file svdrp.c.

References cThread::Cancel(), serverConnections, and cVector< T >::Size().

Member Function Documentation

◆ Action()

void cSVDRPServerHandler::Action ( void )
protectedvirtual

A derived cThread class must implement the code it wants to execute as a separate thread in this function.

If this is a loop, it must check Running() repeatedly to see whether it's time to stop.

Implements cThread.

Definition at line 2804 of file svdrp.c.

References cPoller::Add(), cSocket::Close(), cPoller::Del(), HandleServerConnection(), cSocket::Listen(), cPoller::Poll(), ProcessConnections(), ready, cThread::Running(), cSocket::Socket(), SVDRPServerPoller, and tcpSocket.

◆ HandleServerConnection()

void cSVDRPServerHandler::HandleServerConnection ( void )
private

Definition at line 2797 of file svdrp.c.

References cSocket::Accept(), cVector< T >::Append(), cSocket::LastIpAddress(), serverConnections, and tcpSocket.

Referenced by Action().

◆ ProcessConnections()

void cSVDRPServerHandler::ProcessConnections ( void )
private

Definition at line 2786 of file svdrp.c.

References cVector< T >::Remove(), serverConnections, and cVector< T >::Size().

Referenced by Action().

◆ WaitUntilReady()

void cSVDRPServerHandler::WaitUntilReady ( void )

Definition at line 2779 of file svdrp.c.

References ready, cCondWait::SleepMs(), and cTimeMs::TimedOut().

Referenced by StartSVDRPHandler().

Member Data Documentation

◆ ready

bool cSVDRPServerHandler::ready
private

Definition at line 2750 of file svdrp.c.

Referenced by Action(), cSVDRPServerHandler(), and WaitUntilReady().

◆ serverConnections

cVector<cSVDRPServer *> cSVDRPServerHandler::serverConnections
private

Definition at line 2752 of file svdrp.c.

Referenced by HandleServerConnection(), ProcessConnections(), and ~cSVDRPServerHandler().

◆ tcpSocket

cSocket cSVDRPServerHandler::tcpSocket
private

Definition at line 2751 of file svdrp.c.

Referenced by Action(), and HandleServerConnection().


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