QtWebApp
|
Alias for QSslConfiguration if OpenSSL is not supported. More...
#include <httpconnectionhandler.h>
Public Slots | |
void | handleConnection (const tSocketDescriptor socketDescriptor) |
Received from from the listener, when the handler shall start processing a new connection. More... | |
Public Member Functions | |
HttpConnectionHandler (const QSettings *settings, HttpRequestHandler *requestHandler, const QSslConfiguration *sslConfiguration=nullptr) | |
Constructor. More... | |
virtual | ~HttpConnectionHandler () |
Destructor. | |
bool | isBusy () |
Returns true, if this handler is in use. | |
void | setBusy () |
Mark this handler as busy. | |
Alias for QSslConfiguration if OpenSSL is not supported.
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.
MaxRequestSize is the maximum size of a HTTP request. In case of multipart/form-data requests (also known as file-upload), the maximum size of the body must not exceed maxMultiPartSize.
Definition at line 52 of file httpconnectionhandler.h.
HttpConnectionHandler::HttpConnectionHandler | ( | const QSettings * | settings, |
HttpRequestHandler * | requestHandler, | ||
const QSslConfiguration * | sslConfiguration = nullptr |
||
) |
Constructor.
settings | Configuration settings of the HTTP webserver |
requestHandler | Handler that will process each incoming HTTP request |
sslConfiguration | SSL (HTTPS) will be used if not NULL |
Definition at line 11 of file httpconnectionhandler.cpp.
|
slot |
Received from from the listener, when the handler shall start processing a new connection.
socketDescriptor | references the accepted connection. |
Definition at line 80 of file httpconnectionhandler.cpp.