4 Star 3 Fork 4

Gitee 极速下载/Tiny-httpd

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/Huangtuzhi/Tinyhttpd
克隆/下载
request.h 1.11 KB
一键复制 编辑 原始数据 按行查看 历史
Huangtuzhi 提交于 2015-05-13 18:57 . a
#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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C/C++
1
https://gitee.com/mirrors/Tiny-httpd.git
[email protected]:mirrors/Tiny-httpd.git
mirrors
Tiny-httpd
Tiny-httpd
master

搜索帮助