19 bool listen(
const QHostAddress &address, quint16 port);
29 : m_tcpServer(
nullptr)
39 const bool couldBindToPort =
m_tcpServer->listen(address, port);
42 QObject::connect(
m_tcpServer, SIGNAL(newConnection()), q, SLOT(newConnection()));
48 return couldBindToPort;
81 #define STATUS_CODE(num, reason) STATUS_CODES.insert(num, reason);
116 STATUS_CODE(416,
"Requested Range Not Satisfiable")
145 return d->listen(address, port);
150 return listen(QHostAddress::Any, port);
The class of the http response.
The class of the http connection.
void close()
Stop the server and listening for new connections.
bool listen(const QHostAddress &address, quint16 port)
QHttpServerPrivate() noexcept
#define STATUS_CODE(num, reason)
The class of the http request.
QHash< int, QString > STATUS_CODES
Maps status codes to string reason phrases.
The class of the http server.
The class of the http server private.
bool listen(const QHostAddress &address=QHostAddress::Any, quint16 port=80)
Start the server by bounding to the given address and port.
QHttpServer(QObject *parent=nullptr)
Construct a new HTTP Server.
#define TTK_INIT_PRIVATE(Class)
The class of the ttk private base.