Stellarium 0.15.2
List of all members | Public Slots | Public Member Functions
HttpConnectionHandler Class Reference

The connection handler accepts incoming connections and dispatches incoming requests to to a request mapper. More...

#include <httpconnectionhandler.h>

+ Inheritance diagram for HttpConnectionHandler:
+ Collaboration diagram for HttpConnectionHandler:

Public Slots

void handleConnection (tSocketDescriptor socketDescriptor)
 Received from from the listener, when the handler shall start processing a new connection. More...
 

Public Member Functions

 HttpConnectionHandler (const HttpConnectionHandlerSettings &settings, HttpRequestHandler *requestHandler, HttpSslConfiguration *sslConfiguration=NULL)
 Constructor. More...
 
virtual ~HttpConnectionHandler ()
 Destructor. More...
 
bool isBusy ()
 Returns true, if this handler is in use. More...
 
void setBusy ()
 Mark this handler as busy. More...
 

Detailed Description

The connection handler accepts incoming connections and dispatches incoming requests to to a request mapper.

Since HTTP clients can send multiple requests before waiting for the response, the incoming requests are queued and processed one after the other.

Example for the required configuration settings:

readTimeout=60000
maxRequestSize=16000
maxMultiPartSize=1000000

The readTimeout value defines the maximum time to wait for a complete HTTP request.

See also
HttpRequest for description of config settings maxRequestSize and maxMultiPartSize.

Definition at line 73 of file httpconnectionhandler.h.

Constructor & Destructor Documentation

HttpConnectionHandler::HttpConnectionHandler ( const HttpConnectionHandlerSettings settings,
HttpRequestHandler requestHandler,
HttpSslConfiguration sslConfiguration = NULL 
)

Constructor.

Parameters
settingsConfiguration settings of the HTTP webserver
requestHandlerHandler that will process each incoming HTTP request
sslConfigurationSSL (HTTPS) will be used if not NULL
virtual HttpConnectionHandler::~HttpConnectionHandler ( )
virtual

Destructor.

Member Function Documentation

void HttpConnectionHandler::handleConnection ( tSocketDescriptor  socketDescriptor)
slot

Received from from the listener, when the handler shall start processing a new connection.

Parameters
socketDescriptorreferences the accepted connection.
bool HttpConnectionHandler::isBusy ( )

Returns true, if this handler is in use.

void HttpConnectionHandler::setBusy ( )

Mark this handler as busy.


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