⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 globals.h

📁 LINUX平台上小型WEB服务器的设计与实现,支持CGI接口.
💻 H
字号:
/*****************************************************/
/**创建者:杨希        日期:2005/04/30             **/
/**文件名:globals.h    版本:1.0.4                 **/
/**描  述:WEB服务器的全局头文件,定义了一些配置参数**/
/**其  它:相比1.0.2主要改正了getparaments的一些BUG **/
/*****************************************************/

#ifndef GLOBALS_H
#define GLOBALS_H

#include <stdio.h>
#include <string.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/wait.h>
#include <fcntl.h>
#include <sys/types.h>

/* 定义服务器所使用的端口号 */
#define SERVER_PORT 80

/* 出错时候的响应码 */
#define ERROR_STR   "<HTML>\n<BODY> 404 File not found\n</BODY>\n</HTML>"

/* 定义返回缓冲区的大小 */
#define RET_BUF_SIZE 32767

/* 定义接受缓冲区的大小 */
#define RECV_BUF_SIZE 4000

/* 定义默认页面 */
#define INDEX_PAGE "main.htm"

#endif /* globals.h */

⌨️ 快捷键说明

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