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

📄 config.h

📁 PTypes是一个扩充了多线程和网络功能的STL库
💻 H
字号:
/* * *  C++ Portable Types Library (PTypes) *  Version 2.0.2  Released 17-May-2004 * *  Copyright (C) 2001-2004 Hovik Melikyan * *  http://www.melikyan.com/ptypes/ * */#ifndef W_CONFIG_H#define W_CONFIG_H#include <ptypes.h>USING_PTYPES// things that can hardly change#define MAX_TOKEN               4096#define MAX_REQUEST_URI         4096#define FILE_BUF_SIZE		4096#define SOCKET_BUF_SIZE         2048#define DEF_HTTP_PORT           80#define DEF_KEEP_ALIVE_TIMEOUT  15000#define DEF_MAX_CLIENTS         30// we no longer use strftime for HTTP time stamps, since it may// depend on the system locale. now we build the time stamp // `manually' instead// #define HTTP_DATE_FMT           "%a, %d %b %Y %H:%M:%S GMT"// built-in configurationextern const char*   SERVER_APP_NAME;   // "wshare/1.2 (system)"extern const char*   DEF_MIME_TYPE;     // "text/plain" for files with no extension// not implemented: extern const char*   DEF_BINARY_TYPE;   // "application/octet-stream" for unix binariesextern const char*   STD_CSS;           // CSS for built-in responses, such like 404 Not foundextern const char*   cfg_index_files[]; // index.html, Index.html and default.htmextern const char*   mimetypes[];       // built-in MIME types and extensions (in mimetable.cxx)// configurable parametersextern string  cfg_document_root;       // no default, must be specified through cmdlineextern string  cfg_server_name;         // default is my nodenameextern int     cfg_port;                // 80extern bool    cfg_dir_indexes;         // allow directory indexesextern bool    cfg_def_index_files;     // use default index files index.html, ...extern string  cfg_log_file;            // access log file nameextern bool    cfg_log_referer;         // include referer in logextern bool    cfg_file_mtime;          // send `last-modified' for html filesextern int     cfg_max_clients;         // max number of simultaneous connections, default 30extern int     cfg_max_keep_alive;      // max keep-alive clients, currently 2/3 of max_clientsextern bool    cfg_syslog;              // write the log to stderr or to Unix syslogextern string  cfg_user;                // user name to run as on Unixextern string  cfg_group;               // group name to run as on Unixextern bool    cfg_daemonize;           // daemonize on Unixextern char*   myname;                  // "wshare", for syslogvoid config_init(int argc, char* argv[]);void config_done();#ifdef _MSC_VER// we don't want "conditional expression is constant" warning#  pragma warning (disable: 4127)#endif#endif

⌨️ 快捷键说明

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