ddc
Public Member Functions | Public Attributes | List of all members
CDDCServerThread Class Reference

low-level class implementing a single CDDCServer per-client worker thread More...

#include <ServerThread.h>

Inheritance diagram for CDDCServerThread:
Inheritance graph
[legend]
Collaboration diagram for CDDCServerThread:
Collaboration graph
[legend]

Public Member Functions

 CDDCServerThread (CDDCServer *Parent=NULL, size_t ThreadId=1)
 
virtual ~CDDCServerThread ()
 
virtual void * run ()
 
- Public Member Functions inherited from ddcThread
 ddcThread ()
 
virtual ~ddcThread ()
 
pthread_t self () const
 get current thread-id More...
 
virtual std::string toString () const
 get string representation of the current thread More...
 
pthread_attr_t * attr () const
 get current thread attributes (for use by child classes) More...
 
int running () const
 get value of m_running flag More...
 
int detached () const
 get value of m_detached flag More...
 
virtual void init ()
 
virtual int start ()
 
virtual int join ()
 
virtual int detach (bool force=false)
 

Public Attributes

size_t m_ThreadId
 
string m_Label
 
CDDCServerm_Parent
 
CDDCServerm_Server
 
int m_Client
 

Additional Inherited Members

- Protected Attributes inherited from ddcThread
pthread_t m_tid
 underlying thread handle More...
 
pthread_attr_t * m_attr
 underlying thread attributes (NULL by default) More...
 
int m_running
 is this thread is currently running? More...
 
int m_detached
 is this thread currently detached? More...
 

Detailed Description

low-level class implementing a single CDDCServer per-client worker thread

Constructor & Destructor Documentation

◆ CDDCServerThread()

CDDCServerThread::CDDCServerThread ( CDDCServer Parent = NULL,
size_t  ThreadId = 1 
)

default constructor; set ClientSocket=-1 for pool threads

References m_Parent, m_Server, CDDCServer::WorkerClone(), and CDDCServer::WorkerCloneInit().

Referenced by CDDCServerThreadPool::start().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~CDDCServerThread()

CDDCServerThread::~CDDCServerThread ( )
virtual

destructor calls m_Server->WorkerCloneFree() and deletes it

References m_Server, and CDDCServer::WorkerCloneFree().

Here is the call graph for this function:

Member Function Documentation

◆ run()

void * CDDCServerThread::run ( void  )
virtual

Member Data Documentation

◆ m_ThreadId

size_t CDDCServerThread::m_ThreadId

worker-index

Referenced by run().

◆ m_Label

string CDDCServerThread::m_Label

thread label "CORPUS#TID"; set on run()

Referenced by run().

◆ m_Parent

CDDCServer* CDDCServerThread::m_Parent

parent server (read-only)

Referenced by CDDCServerThread(), and run().

◆ m_Server

CDDCServer* CDDCServerThread::m_Server

thread-local server (worker copy)

Referenced by CDDCServerThread(), run(), and ~CDDCServerThread().

◆ m_Client

int CDDCServerThread::m_Client

connected client socket

Referenced by run().


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