qhttp::server::QHttpServer

Lightweight HTTP server.

Declared in src/libs/libweb/qhttp/qhttpserver.hpp
Inherits QObject
Inherited By ZooServer
Group qhttp

Detailed description

QHttpServer provides an embeddable HTTP server supporting both TCP sockets and local (UNIX) sockets. Uses http_parser for protocol handling. Emits newRequest() for each incoming request.

See also qhttp::server::QHttpConnection, qhttp::server::QHttpRequest.

Property documentation

timeOut property

timeOut : quint32

This property holds the lifetime, in milliseconds, of each connection that the server accepts.

The server gives this value to each new QHttpConnection when it accepts the connection. The connection starts its timer at that moment and closes its socket when the timer expires, whether a request is in progress or not. The timer does not restart on activity.

A change applies only to connections that the server accepts after the change. The value 0 disables the timer, and 0 is the default.

Access functions:

  • quint32 timeOut() const
  • void setTimeOut(quint32)