13 #include <QSslCertificate> 14 #include <QHttpMultiPart> 15 #include <QThreadPool> 18 #include "qmapthreadsafety.h" 19 #include "httpreadrequest.h" 20 #include "controller.h" 23 #include "controller.h" 24 #include "configuration.h" 27 #include "cppwebframework_global.h" 33 class CPPWEBFRAMEWORKSHARED_EXPORT
CppWebServer :
public QTcpServer
43 QSslConfiguration *ssl =
nullptr;
44 const int sleepTime = 10;
45 QAtomicInteger<qint8> block = 0;
61 template<
typename CONTROLLER>
64 static_assert(std::is_base_of<Controller, CONTROLLER>::value,
"CONTROLLER must be a descendant of Controller");
65 urlController.
insert(url,
new CONTROLLER);
72 void incomingConnection(qintptr socketfd)
override;
81 #endif // CPPWEBSERVER_H iterator insert(const Key &key, const T &value)
This method inserts a new key and value in the map.
Definition: qmapthreadsafety.h:166
void addController(const QString &url) noexcept
Hitches a url to a Controller.
Definition: cppwebserver.h:62
The QMapThreadSafety class is a thread safe QMap.
Definition: qmapthreadsafety.h:23
The CppWebServer class is a HTTP server, responsable to receive and dispatch the requisitions.
Definition: cppwebserver.h:33
The Filter class works like a filter. You can use this class to validate sessions or measuring runtim...
Definition: filter.h:23
All classes of C++ Web Framework are contained within the namespace CWF.
Definition: configuration.h:24