# Client Class Reference

A representation of a Client from the Server's point of view. More...

List of all members.

## Public Member Functions

| Client (unsigned int number, ApplicationPool::Ptr pool, const string &password, const string &defaultUser, const string &defaultGroup, int serverSocket, const AnalyticsLoggerPtr &logger)
| Constructs a client handler for the server with the given arguments and runs it in its own thread.
| ~Client ()
| Destroys this client and its thread.

## Detailed Description

A representation of a Client from the Server's point of view.

This class contains the methods used to communicate from a server to a connected client, i.e. it is a client handler. These Client instances will communicate concurrently with the server through threads. Considering the overhead of these threads, i.e. setup and teardown costs and the volatility of client requests, these client instances will be pooled. It is for this reason that the State design pattern has been applied: this class can be considered as being a skeleton implemention whose state --e.g. the client file descriptor-- needs to be provided in order to function properly.

## Constructor & Destructor Documentation

Client::Client | ( | unsigned int | number,
|  | ApplicationPool::Ptr | pool,
|  | const string & | password,
|  | const string & | defaultUser,
|  | const string & | defaultGroup,
|  | int | serverSocket,
|  | const AnalyticsLoggerPtr & | logger |
| ) |  |  | `[inline]`

Constructs a client handler for the server with the given arguments and runs it in its own thread.

Parameters:

  | number | The id assigned by the server to identify this client by.
  | pool | The application pool where this client belongs to.
  | password | The password that is required to connect to this client handler. This value is determined and assigned by the server.
  | serverSocket | The server socket to accept this clients connection from.

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

- nginx/HelperAgent.cpp