23 #ifndef TUFAO_HTTPUPGRADEROUTER_H 24 #define TUFAO_HTTPUPGRADEROUTER_H 27 #include <initializer_list> 29 #include <QtCore/QObject> 30 #include <QtCore/QRegularExpression> 32 #include "abstracthttpupgradehandler.h" 74 typedef std::function<bool(HttpServerRequest&, const QByteArray &head)>
94 path(path), handler(handler)
119 QObject *parent = 0);
140 int map(std::initializer_list<Mapping> map);
145 void unmap(
int index);
187 const QByteArray &head)
override;
196 #endif // TUFAO_HTTPUPGRADEROUTER_H 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
This class describes a request handler and a filter.
Definition: httpupgraderouter.h:87
This class provides an interface for HTTP Upgrade handlers.
Definition: abstracthttpupgradehandler.h:47
This class provides a robust and high performance HTTP request router.
Definition: httpupgraderouter.h:62
Mapping(QRegularExpression path, Handler handler)
Constructs a Mapping object using path as filter and handler as handler.
Definition: httpupgraderouter.h:93
std::function< bool(HttpServerRequest &, const QByteArray &head)> Handler
It's a simple typedef for the type of handler accepted by the HttpUpgradeRouter. ...
Definition: httpupgraderouter.h:75
QRegularExpression path
This attribute is used to filter requests based on the url's path component.
Definition: httpupgraderouter.h:106