23 #ifndef TUFAO_SERVER_H
24 #define TUFAO_SERVER_H
26 #include <QtNetwork/QTcpServer>
27 #include "tufao_global.h"
29 class QAbstractSocket;
33 class HttpServerRequest;
34 class HttpServerResponse;
35 class HttpUpgradeRouter;
86 bool listen(
const QHostAddress &address = QHostAddress::Any,
92 bool isListening()
const;
101 quint16 serverPort()
const;
114 void setTimeout(
int msecs = 0);
179 void handleConnection(QAbstractSocket *connection);
191 #if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
192 virtual void incomingConnection(qintptr socketDescriptor);
194 virtual void incomingConnection(
int socketDescriptor);
237 #if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
238 void onNewConnection(qintptr socketDescriptor);
240 void onNewConnection(
int socketDescriptor);
242 void onRequestReady();
243 void onUpgrade(
const QByteArray &head);
252 #endif // TUFAO_SERVER_H
The Tufao::HttpServerResponse is used to respond to a Tufao::HttpServerRequest.
Definition: httpserverresponse.h:57
The Tufao::HttpServer represents a HTTP request received by Tufao::HttpServer.
Definition: httpserverrequest.h:47
This class provides a robust and high performance HTTP upgrade router.
Definition: httpupgraderouter.h:58
The Tufao::HttpServer class provides an implementation of the HTTP protocol.
Definition: httpserver.h:54