#include <ClientHandler.h>
Inheritance diagram for net::ClientHandler:

ClientHandlers run concurrently in different threads and handle the requests using a specified protocol. All the methods in this class are MT-safe.
Public Methods | |
| ClientHandler (Protocol *p, int max=-1, int detachState=PTHREAD_CREATE_JOINABLE) throw (TooManyInstancesException&, MutexException&) | |
| Construct a new client handler. | |
| ClientHandler (int max, Protocol *p=NULL, int detachState=PTHREAD_CREATE_JOINABLE) throw (TooManyInstancesException&, MutexException&) | |
| ClientHandler (Protocol &p, int max=-1, int detachState=PTHREAD_CREATE_JOINABLE) throw (TooManyInstancesException&, MutexException&) | |
| ClientHandler (int max, Protocol &p, int detachState=PTHREAD_CREATE_JOINABLE) throw (TooManyInstancesException&, MutexException&) | |
| virtual | ~ClientHandler () |
| Destroy a ClientHandler. | |
| void | setProtocol (Protocol *p) |
| Set the protocol used by this client handler. | |
| void | setProtocol (Protocol &p) |
| Set the protocol used by this client handler. | |
| Protocol * | getProtocol (void) |
| Get the protocol used by this client handler. | |
| void | run (void) |
Static Public Methods | |
| int | getInstanceCount (void) |
| Get the current number of ClientHandler instances. | |
|
||||||||||||||||
|
Construct a new client handler. Use the given protocol to handle requests. Note that if a protocol is stateless, it can be shared between multiple clients.
|
|
|
Destroy a ClientHandler.
|
|
|
Get the current number of ClientHandler instances. This may help in limiting the number of allowed concurrent connections.
|
|
|
Set the protocol used by this client handler. The memory referenced by p is not automatically released. |
|
|
Set the protocol used by this client handler. The memory pointed by p is automatically released. |