QDjango
|
The QDjangoHttpServer class represents an HTTP server. More...
#include <QDjangoHttpServer.h>
Signals | |
void | requestFinished (QDjangoHttpRequest *request, QDjangoHttpResponse *response) |
Public Member Functions | |
QDjangoHttpServer (QObject *parent=0) | |
~QDjangoHttpServer () | |
void | close () |
bool | listen (const QHostAddress &address, quint16 port) |
QHostAddress | serverAddress () const |
quint16 | serverPort () const |
QDjangoUrlResolver * | urls () const |
The QDjangoHttpServer class represents an HTTP server.
It allows you to create a standalone HTTP server which will serve your web application.
To register views, see urls().
QDjangoHttpServer::QDjangoHttpServer | ( | QObject * | parent = 0 | ) |
Constructs a new HTTP server.
QDjangoHttpServer::~QDjangoHttpServer | ( | ) |
Destroys the HTTP server.
void QDjangoHttpServer::close | ( | ) |
Closes the server. The server will no longer listen for incoming connections.
bool QDjangoHttpServer::listen | ( | const QHostAddress & | address, |
quint16 | port | ||
) |
Tells the server to listen for incoming TCP connections on the given address and port.
|
signal |
This signal is emitted when a request completes.
QHostAddress QDjangoHttpServer::serverAddress | ( | ) | const |
Returns the server's address if the server is listening for connections; otherwise returns QHostAddress::Null.
quint16 QDjangoHttpServer::serverPort | ( | ) | const |
Returns the server's port if the server is listening for connections; otherwise returns 0.
QDjangoUrlResolver * QDjangoHttpServer::urls | ( | ) | const |
Returns the root URL resolver for the server, which dispatches requests to handlers.