8 #ifndef _HttpConnection_H_ 9 #define _HttpConnection_H_ 13 #include <QSslCertificate> 16 #include <QHostAddress> 22 class HttpRequestHandler;
74 QTcpSocket *
socket()
const {
return m_socket; }
109 void setTimeout(
int x) { m_timeout->setInterval(x); startTimeout(); }
119 QVariant webStatus()
const;
130 #ifndef DOXYGEN_SHOULD_SKIP_THIS 133 void slotDisconnected();
136 void deleteRequest();
138 QTcpSocket *m_socket;
140 HttpRequest *m_request;
141 QList<HttpRequest *> m_requests;
142 HttpRequestHandler *m_handler;
143 HttpServer *m_parent;
144 QSslCertificate m_peerCertificate;
145 QHostAddress m_peerAddress;
const HttpSettings * settings() const
Returns pointer to settings used in the class.
const QSslCertificate peerCertificate() const
Returns Peer's certificate.
HttpServer * httpServer() const
Returns pointer to http server.
QTcpSocket * socket() const
Returns the socket.
General single-threaded, event-driven HTTP server.
Response to HTTP request - headers, cookies and body.
Configuration of the http server instance.
bool verified() const
Returns true if the client is verified using SSL.
HttpConnection(HttpServer *parent, QTcpSocket *socket)
Constructor is called automatically when new request arrived.
bool isConnected() const
Returns true if the connection is in connected state.
HttpResponse * response()
Returns new instance of class HttpResponse.
void close()
Closes the connection.
Processes HTTP request, parses headers, body and files sent by HTTP protocol.
void setPeerCertificate(const QSslCertificate &)
Sets peer's certificate.
void setVerified(bool x)
Sets the flag verified.
QHostAddress peerAddress() const
Returns peer's host address.
Namespace of HTTP server.
QString commonName() const
Returns CommonName field from certificate.
One single connection to http server.