|
PACK Qt Binding
$VERSION$
|
#include <server.h>
Public Slots | |
| void | registerInterface (const QString &path, WInterface *ifc) |
| void | registerStatic (const QString &path, const QString &content) |
| void | unregisterPath (const QString &) |
| deletes whatever registration exists at a specific path More... | |
| void | register404 (const QString &) |
| registers a custom page for a 404 Not Found error More... | |
| void | register400 (const QString &) |
| registers a custom page for a 400 Invalid Request error More... | |
| void | setReceiveTimeout (int) |
| sets the receive timeout of the server More... | |
| void | restrictSourceHosts (const QPair< QHostAddress, int > &) |
| restricts the hosts that can connect to this server More... | |
| void | enableDebugUrl (bool enable=true) |
| enable or disable the /debug path, if enabled a request at that path simply returns the content of the request as a response More... | |
Public Member Functions | |
| WServer (const QString &path, bool removeIfExist=true, QObject *parent=0) | |
| WServer (const QHostAddress &addr, unsigned short port, QObject *parent=0) | |
| virtual | ~WServer ()=default |
| deletes the server object More... | |
| bool | isActive () const |
| returns true if this is a working server (i.e. the constructor did not have errors) More... | |
| int | receiveTimeout () const |
| quint16 | tcpPort () const |
| returns the TCP port if it runs on TCP More... | |
Represents an SCGI server as a proxy to server side interfaces.
Use the cgi2scgi helper to translate between CGI and SCGI.
| WServer::WServer | ( | const QString & | path, |
| bool | removeIfExist = true, |
||
| QObject * | parent = 0 |
||
| ) |
creates a new server listening to a local socket
| path | the (file) name of the socket (or named pipe on Windows) |
| removeIfExist | if true the socket file is removed before trying to create it again (this is a good idea on Unix/Linux, since existing sockets cannot be created) |
| parent | the owning QObject of this server |
| WServer::WServer | ( | const QHostAddress & | addr, |
| unsigned short | port, | ||
| QObject * | parent = 0 |
||
| ) |
creates a new server listening to a TCP socket
| addr | the address to listen on |
| port | the TCP port to listen on |
| parent | owning QObject of this server |
|
virtualdefault |
deletes the server object
|
slot |
enable or disable the /debug path, if enabled a request at that path simply returns the content of the request as a response
|
inline |
returns true if this is a working server (i.e. the constructor did not have errors)
|
inline |
returns the current receive timeout in seconds this is the time that a request has to be completely received
|
slot |
registers a custom page for a 400 Invalid Request error
|
slot |
registers a custom page for a 404 Not Found error
|
slot |
registers an interface to handle a specific path
| path | the relative path inside the server's address space |
| ifc | the interface that handles this path |
|
slot |
registers a specific content to be served on a path
| path | the relative path inside the server's address space |
| content | the page content to deliver |
|
slot |
restricts the hosts that can connect to this server
|
slot |
sets the receive timeout of the server
| quint16 WServer::tcpPort | ( | ) | const |
returns the TCP port if it runs on TCP
|
slot |
deletes whatever registration exists at a specific path
1.8.8