#include <wshttpserver.h>
Signals | |
void | newConnect () |
void | endConnect () |
void | wroteToClient () |
void | message (const QString &text, int type=Configuration::Normal) |
Public Member Functions | |
WSHttpServer (QObject *parent=0) | |
~WSHttpServer () | |
void | newConnection (int socket) |
It provides minimal service to handle requests for files. Every request is a separate connection, and upon sending the response, the connection is closed. It also supports sending compressed (deflate) responses.
The files accesible thru this web server are governed by the Configuration::WWW.Files list. Only files in the list can be accessed. There is no directory resolution, and all files are accessed by their name. So if we have a file main.png, then it is accessed using the URL http://ip:port/main.png, where ip is the IP of the computer (eg. 123.345.567.789), and port is the Port specified thru Config().
Definition at line 51 of file wshttpserver.h.
|
Default constructor. Call QServerSocket::ok() to find out if construction suceeded.
Definition at line 38 of file wshttpserver.cpp. |
|
Default destructor. Definition at line 56 of file wshttpserver.cpp. |
|
Signal emitted when a connection is closed with a client. |
|
Sends log message.
Referenced by newConnection(), and WSHttpServer(). |
|
Signal emitted when a new connection is made with the server. Referenced by newConnection(). |
|
Slot for a new connection. When a new client connects, the server constructs a QSocket and all communication with the client is done over this QSocket. QSocket works asynchronously.
Definition at line 60 of file wshttpserver.cpp. References message(), and newConnect(). |
|
Signal emitted when we wrote something to the client. |