TTKMusicPlayer
4.1.3.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
|
The class of the http server. More...
#include <qhttpserver.h>
Signals | |
void | newRequest (QHttpRequest *request, QHttpResponse *response) |
Emitted when a client makes a new request to the server. More... | |
Public Member Functions | |
QHttpServer (QObject *parent=nullptr) | |
Construct a new HTTP Server. More... | |
bool | listen (const QHostAddress &address=QHostAddress::Any, quint16 port=80) |
Start the server by bounding to the given address and port . More... | |
bool | listen (quint16 port) |
Starts the server on port listening on all interfaces. More... | |
void | close () |
Stop the server and listening for new connections. More... | |
Private Slots | |
void | newConnection () |
The class of the http server.
Definition at line 37 of file qhttpserver.h.
|
explicit |
Construct a new HTTP Server.
parent | Parent QObject for the server. |
Definition at line 75 of file qhttpserver.cpp.
References STATUS_CODE, and TTK_INIT_PRIVATE.
void QHttpServer::close | ( | ) |
Stop the server and listening for new connections.
Definition at line 151 of file qhttpserver.cpp.
References TTK_D.
Referenced by QDlnaFileServerPrivate::~QDlnaFileServerPrivate().
bool QHttpServer::listen | ( | const QHostAddress & | address = QHostAddress::Any , |
quint16 | port = 80 |
||
) |
Start the server by bounding to the given address
and port
.
address | Address on which to listen to. Default is to listen on all interfaces which means the server can be accessed from anywhere. |
port | Port number on which the server should run. |
Definition at line 140 of file qhttpserver.cpp.
References TTK_D.
Referenced by listen().
bool QHttpServer::listen | ( | quint16 | port | ) |
Starts the server on port
listening on all interfaces.
port | Port number on which the server should run. |
Definition at line 146 of file qhttpserver.cpp.
References listen().
|
privateslot |
Definition at line 134 of file qhttpserver.cpp.
References TTK_D.
|
signal |
Emitted when a client makes a new request to the server.
The slot should use the given request
and response
objects to communicate with the client.
request | New incoming request. |
response | Response object to the request. |