GOTO 
index
workerthread
Defined in header file:  workerthread.hh

Description

\brief This abstract class is part of the daemon framework. When a scheduler accepts an incoming connection it starts a workerthread which, as usual, reads some data from the socket, performs some action on the data and sends a result back. These steps should done in the pure virtual method dowork() which has to be implemented by derived classes.

A workerthread provides the following protected attributes:

Public base classes

LAIR::thread

Constructors

Constructor Description
workerthread() \brief Constructor.

Members

Types Description
Methods
virtual void  dowork()   = 0 \brief Pure virtual method. This method has to be implemented by derived classes and is called by the scheduler when a connection has been accepted and a valid file descriptor for the socket has been be created. Data can be read and written to the socket by using this file descriptor directly or by using the tcp class. After all work is done the file descriptor has to be closed in this method, otherwise the scheduler will run out of file descriptors.
index

Copyright © 2005-2006 Retrieval Solutions. All rights reserved.