代码拉取完成,页面将自动刷新
#ifndef REQUEST_H
#define REQUEST_H
#include "response.h"
#include "QThread"
#include <QTcpServer>
#include <QFile>
#include <QStringList>
#include <QTimer>
#include <database.h>
class Request: public QThread
{
Q_OBJECT
public:
Request(int socketDescriptor, QObject* parent = 0);
virtual void run();
private:
int socketDescriptor;
QTcpSocket* socket;
Database* redis;
bool keep_alive;
int keep_alive_timeout;
QTimer* keep_alive_timer;
QMap<QString, QString> request_header, response_header;
int response_code;
QString response_filename;
Response* response;
static bool s_initialized;
static QString s_root_path;
static QStringList s_index;
static bool s_dir_listing;
static bool s_keep_alive_enable;
static bool s_keep_alive_default;
static int s_keep_alive_timeout;
static int s_keep_alive_timeout_max;
void clearStatus();
bool getRequestHeader();
void tryResponseFile(QString filename);
static void initialize();
public slots:
void onReadyRead();
void onDisconnected();
void onTimeout();
};
#endif // REQUEST_H
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。