随笔分类 - mini-httpd源码分析
摘要:main函数分析;一,参数设置: 读取命令行参数 配置文件参数 读取参数,设置对应的全局变量。主要参数有:配置文件;资源目录;进程ID文件;日志文件;字符集;主机名及端口号...二,参数处理:重点分析,主机名及端口号,damon 1,主机名及端口号 解析主机名,获...
阅读全文
摘要:version.h #define SERVER_SOFTWARE "mini_httpd/1.21 18oct2014" #define SERVER_URL "http://www.acme.com/software/mini_httpd/"port.h #define OS_...
阅读全文
摘要://字符串匹配,匹配返回 1,否则返回 0.//pattern可以通过任意个 | 字符,组合match_one中pattern的功能intmatch(const char* pattern, const char* string){ const char* or; for (;;) ...
阅读全文
摘要:///关联字符串和整数struct strlong { char* s; long l;};///将字符串中的大写字母转换成小写字母static void pound_case(char* str)//比较stlong类型中字符串*s,用strcmp比较static int strlon...
阅读全文
摘要:针对不同系统的宏定义,对于Linux而言/* port.h - portability defines */#elif defined(linux)# define OS_Linux# define ARCH "Linux"#ifdef OS_Linux# define HAVE_DAEMON# d...
阅读全文
摘要:/* version.h - version defines for mini_httpd */#ifndef _VERSION_H_#define _VERSION_H_#define SERVER_SOFTWARE "mini_httpd/1.21 18oct2014"#define SERVE...
阅读全文
浙公网安备 33010602011771号