Listens for incoming TCP connections and passes control to one of the pooled connection handlers. More...
#include <httplistener.h>
Signals | |
void | handleConnection (int socketDescriptor) |
Emitted when the connection handler shall process a new incoming onnection. | |
Public Member Functions | |
HttpListener (QSettings *settings, HttpRequestHandler *requestHandler, QObject *parent=0) | |
Constructor. | |
virtual | ~HttpListener () |
Destructor. | |
Protected Member Functions | |
void | incomingConnection (int socketDescriptor) |
Serves new incoming connection requests. |
Listens for incoming TCP connections and passes control to one of the pooled connection handlers.
This class is also responsible for managing the pool.
Example for the required settings in the config file:
port=8080 minThreads=1 maxThreads=10 cleanupInterval=1000 readTimeout=60000 maxRequestSize=16000 maxMultiPartSize=1000000
The port number is the incoming TCP port that this listener listens to.
Definition at line 37 of file httplistener.h.
HttpListener::HttpListener | ( | QSettings * | settings, | |
HttpRequestHandler * | requestHandler, | |||
QObject * | parent = 0 | |||
) |
Constructor.
settings | Configuration settings for the HTTP server. Must not be 0. | |
requestHandler | Processes each received HTTP request, usually by dispatching to controller classes. | |
parent | Parent object |
Definition at line 11 of file httplistener.cpp.
void HttpListener::handleConnection | ( | int | socketDescriptor | ) | [signal] |
Emitted when the connection handler shall process a new incoming onnection.
socketDescriptor | references the accepted connection. |