Signals | Public Member Functions | Protected Member Functions

HttpListener Class Reference

Listens for incoming TCP connections and passes control to one of the pooled connection handlers. More...

#include <httplistener.h>

List of all members.

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.

Detailed Description

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.

See also:
HttpConnectionHandlerPool for description of config settings minThreads, maxThreads and cleanupInterval
HttpConnectionHandler for description of config settings readTimeout
HttpRequest for description of config settings maxRequestSize and maxMultiPartSize

Definition at line 37 of file httplistener.h.


Constructor & Destructor Documentation

HttpListener::HttpListener ( QSettings *  settings,
HttpRequestHandler requestHandler,
QObject *  parent = 0 
)

Constructor.

Parameters:
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.


Member Function Documentation

void HttpListener::handleConnection ( int  socketDescriptor  )  [signal]

Emitted when the connection handler shall process a new incoming onnection.

Parameters:
socketDescriptor references the accepted connection.

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