httptse.h

来自「小型搜索引擎,用C/C++编写,属于全文搜索引擎」· C头文件 代码 · 共 32 行

H
32
字号
#ifndef HTTP_TSE_030717#define HTTP_TSE_0300717#include <map>using namespace std;extern pthread_mutex_t mymutex;const int PORT_NUMBER = 80;#define HTTP_VERSION		"HTTP/1.1"#define DEFAULT_USER_AGENT	"Tse"#define VERSION			"1.0"const int DEFAULT_TIMEOUT = 30;              /* Seconds to wait before giving up						 	 * when no data is arriving */const int REQUEST_BUF_SIZE = 1024;const int HEADER_BUF_SIZE = 1024;const int DEFAULT_PAGE_BUF_SIZE = 1024 * 200;      /* 200K should hold most things */const int MAX_PAGE_BUF_SIZE = 5 * 1024 * 1024;      /* 5MB is up limit *///int HttpFetch(string strUrl, char **fileBuf, char **fileHead, char **location);int HttpFetch(string strUrl, char **fileBuf, char **fileHead, char **location, int* sock);int _http_read_header(int sock, char *headerPtr);int MakeSocket(const char *host);int nonb_connect(int,struct sockaddr*,int);#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?