23 #ifndef TUFAO_SERVER_H
24 #define TUFAO_SERVER_H
27 #include <QtNetwork/QTcpServer>
28 #include "tufao_global.h"
30 class QAbstractSocket;
34 class HttpServerRequest;
35 class HttpServerResponse;
68 typedef std::function<void(HttpServerRequest &request, const QByteArray&)>
99 bool listen(
const QHostAddress &address = QHostAddress::Any,
105 bool isListening()
const;
114 quint16 serverPort()
const;
127 void setTimeout(
int msecs = 0);
209 void handleConnection(QAbstractSocket *connection);
221 virtual void incomingConnection(qintptr socketDescriptor);
245 void onNewConnection(qintptr socketDescriptor);
246 void onRequestReady();
256 #endif // TUFAO_SERVER_H
The Tufao::HttpServerResponse is used to respond to a Tufao::HttpServerRequest.
Definition: httpserverresponse.h:142
The Tufao::HttpServer represents a HTTP request received by Tufao::HttpServer.
Definition: httpserverrequest.h:54
This is the namespace where all Tufão facilities are grouped.
Definition: abstracthttpserverrequesthandler.h:30
std::function< void(HttpServerRequest &request, const QByteArray &)> UpgradeHandler
A typedef to http upgrade request handler.
Definition: httpserver.h:69
The Tufao::HttpServer class provides an implementation of the HTTP protocol.
Definition: httpserver.h:54