![]() |
QxOrm 1.4.9
C++ Object Relational Mapping library
|
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>
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. | |
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.
typedef std::function<void (qx::QxHttpRequest &, qx::QxHttpResponse &)> qx::QxHttpServer::type_fct_custom_request_handler |
Definition at line 84 of file QxHttpServer.h.
qx::QxHttpServer::QxHttpServer | ( | QObject * | parent = NULL | ) |
|
virtual |
void qx::QxHttpServer::afterDispatching | ( | type_fct_custom_request_handler | fct | ) |
void qx::QxHttpServer::beforeDispatching | ( | type_fct_custom_request_handler | fct | ) |
|
static |
|
static |
void qx::QxHttpServer::clearDispatcher | ( | ) |
QxHttpServer & qx::QxHttpServer::dispatch | ( | const QString & | command, |
const QString & | path, | ||
type_fct_custom_request_handler | fct, | ||
long | position = -1 ) |
|
signal |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
signal |
void qx::QxHttpServer::setCustomRequestHandler | ( | type_fct_custom_request_handler | fct | ) |
void qx::QxHttpServer::setEventDispatcher | ( | QAbstractEventDispatcher * | pEventDispatcher | ) |
Q_INVOKABLE void qx::QxHttpServer::startServer | ( | ) |
Q_INVOKABLE void qx::QxHttpServer::stopServer | ( | ) |
|
signal |
|
signal |
|
private |
Private implementation idiom.
Definition at line 89 of file QxHttpServer.h.