Pool of http connection handlers. More...
#include <httpconnectionhandlerpool.h>
Public Member Functions | |
HttpConnectionHandlerPool (QSettings *settings, HttpRequestHandler *requestHandler) | |
Constructor. | |
virtual | ~HttpConnectionHandlerPool () |
Destructor. | |
HttpConnectionHandler * | getConnectionHandler () |
Get a free connection handler, or 0 if not available. |
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.
Definition at line 29 of file httpconnectionhandlerpool.h.
HttpConnectionHandlerPool::HttpConnectionHandlerPool | ( | QSettings * | settings, | |
HttpRequestHandler * | requestHandler | |||
) |
Constructor.
settings | Configuration settings for the HTTP server. Must not be 0. | |
requestHandler | The handler that will process each received HTTP request. |
Definition at line 3 of file httpconnectionhandlerpool.cpp.
HttpConnectionHandler * HttpConnectionHandlerPool::getConnectionHandler | ( | ) |
Get a free connection handler, or 0 if not available.
Definition at line 21 of file httpconnectionhandlerpool.cpp.