qx::QxHttpServer : HTTP server which manages connections in a multi-threaded environment (support SSL/TLS, persistent connection, etc...) : https://www.qxorm.com/qxorm_en/manual.html#manual_96
More...
#include <QxHttpServer.h>
List of all members.
Public Types |
typedef std::function< void(qx::QxHttpRequest
&, qx::QxHttpResponse &)> | type_fct_custom_request_handler |
Signals |
void | error (const QString &err, qx::QxHttpTransaction_ptr transaction) |
void | transactionStarted (qx::QxHttpTransaction_ptr transaction) |
void | transactionFinished (qx::QxHttpTransaction_ptr transaction) |
void | serverStatusChanged (bool bIsRunning) |
Public Member Functions |
| QxHttpServer (QObject *parent=NULL) |
virtual | ~QxHttpServer () |
Q_INVOKABLE void | startServer () |
Q_INVOKABLE void | stopServer () |
void | setCustomRequestHandler (type_fct_custom_request_handler fct) |
QxHttpServer & | dispatch (const QString &command, const QString &path, type_fct_custom_request_handler fct, long position=-1) |
void | beforeDispatching (type_fct_custom_request_handler fct) |
void | afterDispatching (type_fct_custom_request_handler fct) |
void | clearDispatcher () |
void | setEventDispatcher (QAbstractEventDispatcher *pEventDispatcher) |
Static Public Member Functions |
static void | buildResponseStaticFile (qx::QxHttpRequest &request, qx::QxHttpResponse &response, const QString &serverPath, qlonglong chunkedSize=0) |
static void | buildResponseQxRestApi (qx::QxHttpRequest &request, qx::QxHttpResponse &response) |
Private Slots |
void | onError (const QString &err, qx::service::QxTransaction_ptr transaction) |
void | onServerIsRunning (bool bIsRunning, qx::service::QxServer *pServer) |
void | onTransactionStarted (qx::service::QxTransaction_ptr transaction) |
void | onTransactionFinished (qx::service::QxTransaction_ptr transaction) |
void | onCustomRequestHandler (qx::service::QxTransaction_ptr transaction) |
Private Attributes |
std::unique_ptr< QxHttpServerImpl > | m_pImpl |
| Private implementation idiom.
|
Detailed Description
qx::QxHttpServer : HTTP server which manages connections in a multi-threaded environment (support SSL/TLS, persistent connection, etc...) : https://www.qxorm.com/qxorm_en/manual.html#manual_96
Definition at line 77 of file QxHttpServer.h.
Member Typedef Documentation
Constructor & Destructor Documentation
qx::QxHttpServer::QxHttpServer |
( |
QObject * |
parent = NULL | ) |
|
virtual qx::QxHttpServer::~QxHttpServer |
( |
| ) |
[virtual] |
Member Function Documentation
static void qx::QxHttpServer::buildResponseStaticFile |
( |
qx::QxHttpRequest & |
request, |
|
|
qx::QxHttpResponse & |
response, |
|
|
const QString & |
serverPath, |
|
|
qlonglong |
chunkedSize = 0 |
|
) |
| [static] |
void qx::QxHttpServer::clearDispatcher |
( |
| ) |
|
void qx::QxHttpServer::onServerIsRunning |
( |
bool |
bIsRunning, |
|
|
qx::service::QxServer * |
pServer |
|
) |
| [private, slot] |
void qx::QxHttpServer::serverStatusChanged |
( |
bool |
bIsRunning | ) |
[signal] |
void qx::QxHttpServer::setEventDispatcher |
( |
QAbstractEventDispatcher * |
pEventDispatcher | ) |
|
Q_INVOKABLE void qx::QxHttpServer::startServer |
( |
| ) |
|
Q_INVOKABLE void qx::QxHttpServer::stopServer |
( |
| ) |
|
Member Data Documentation
The documentation for this class was generated from the following file: