![]() |
Vault
4.1
|
VSocketThreadFactory is an abstract base class that you must override to create the kind of VSocketThread subclass you want. More...
#include <vsocketthreadfactory.h>
Public Member Functions | |
VSocketThreadFactory (VManagementInterface *manager) | |
Constructs the factory with the optional management interface that will be supplied to each socket thread. | |
virtual | ~VSocketThreadFactory () |
Destructor, declared for completeness. | |
void | setManager (VManagementInterface *manager) |
Sets the management interface to receive notifications. | |
virtual VSocketThread * | createThread (VSocket *socket, VListenerThread *ownerThread)=0 |
Creates a VSocketThread object to communicate on the specified socket. | |
Protected Attributes | |
VManagementInterface * | mManager |
The management interface supplied to each thread. |
VSocketThreadFactory is an abstract base class that you must override to create the kind of VSocketThread subclass you want.
You simply override the createThread method. You will typically pass such an object to a VListenerThread so that it can create your kind of socket thread to manage an incoming connection.
Definition at line 28 of file vsocketthreadfactory.h.
void VSocketThreadFactory::setManager | ( | VManagementInterface * | manager | ) | [inline] |
Sets the management interface to receive notifications.
May be NULL if no notifications are to be given.
manager | the manager to notify, or NULL |
Definition at line 47 of file vsocketthreadfactory.h.
References mManager.
virtual VSocketThread* VSocketThreadFactory::createThread | ( | VSocket * | socket, |
VListenerThread * | ownerThread | ||
) | [pure virtual] |
Creates a VSocketThread object to communicate on the specified socket.
socket | the socket to initialize the VSocketThread with |
ownerThread | the owner thread to initialize the VSocketThread with |