QDjango: QDjangoHttpServer Class Reference

QDjango

Signals | Public Member Functions | List of all members
QDjangoHttpServer Class Reference
Http

The QDjangoHttpServer class represents an HTTP server. More...

`#include <QDjangoHttpServer.h>`

Inheritance diagram for QDjangoHttpServer:

## 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

## Detailed Description

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().

See also
  QDjangoFastCgiServer

## Constructor & Destructor Documentation

## ◆ QDjangoHttpServer()

QDjangoHttpServer::QDjangoHttpServer | ( | QObject * | parent = `0` | ) |

Constructs a new HTTP server.

## ◆ ~QDjangoHttpServer()

QDjangoHttpServer::~QDjangoHttpServer | ( |  | ) |

Destroys the HTTP server.

## Member Function Documentation

## ◆ close()

void QDjangoHttpServer::close | ( |  | ) |

Closes the server. The server will no longer listen for incoming connections.

## ◆ listen()

bool QDjangoHttpServer::listen | ( | const QHostAddress & | address,
|  | quint16 | port
| ) |  |

Tells the server to listen for incoming TCP connections on the given address and port.

## ◆ requestFinished

void QDjangoHttpServer::requestFinished | ( | QDjangoHttpRequest * | request,
|  | QDjangoHttpResponse * | response
| ) |  |
| signal

This signal is emitted when a request completes.

## ◆ serverAddress()

QHostAddress QDjangoHttpServer::serverAddress | ( |  | ) | const

Returns the server's address if the server is listening for connections; otherwise returns QHostAddress::Null.

## ◆ serverPort()

quint16 QDjangoHttpServer::serverPort | ( |  | ) | const

Returns the server's port if the server is listening for connections; otherwise returns 0.

## ◆ urls()

QDjangoUrlResolver * QDjangoHttpServer::urls | ( |  | ) | const

Returns the root URL resolver for the server, which dispatches requests to handlers.

The documentation for this class was generated from the following files:

- QDjangoHttpServer.h
- QDjangoHttpServer.cpp