Public Member Functions

HttpConnectionHandlerPool Class Reference

Pool of http connection handlers. More...

#include <httpconnectionhandlerpool.h>

List of all members.

Public Member Functions

 HttpConnectionHandlerPool (QSettings *settings, HttpRequestHandler *requestHandler)
 Constructor.
virtual ~HttpConnectionHandlerPool ()
 Destructor.
HttpConnectionHandlergetConnectionHandler ()
 Get a free connection handler, or 0 if not available.

Detailed Description

Pool of http connection handlers.

Connection handlers are created on demand and idle handlers are cleaned up in regular time intervals.

Example for the required configuration settings:

  minThreads=1
  maxThreads=10
  cleanupInterval=1000
  maxRequestSize=16000
  maxMultiPartSize=1000000
  

The pool is empty initially and grows with the number of concurrent connections. A timer removes one idle connection handler at each interval, but a it leaves some spare handlers in memory to improve performance.

See also:
HttpConnectionHandler for description of config settings readTimeout
HttpRequest for description of config settings maxRequestSize and maxMultiPartSize

Definition at line 29 of file httpconnectionhandlerpool.h.


Constructor & Destructor Documentation

HttpConnectionHandlerPool::HttpConnectionHandlerPool ( QSettings *  settings,
HttpRequestHandler requestHandler 
)

Constructor.

Parameters:
settings Configuration settings for the HTTP server. Must not be 0.
requestHandler The handler that will process each received HTTP request.
Warning:
The requestMapper gets deleted by the destructor of this pool

Definition at line 3 of file httpconnectionhandlerpool.cpp.


Member Function Documentation

HttpConnectionHandler * HttpConnectionHandlerPool::getConnectionHandler (  ) 

Get a free connection handler, or 0 if not available.

Definition at line 21 of file httpconnectionhandlerpool.cpp.


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