2 Star 0 Fork 2

MHBase/third_party_simplehttpd

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
example.c 687 Bytes
一键复制 编辑 原始数据 按行查看 历史
无辜的熊本熊 提交于 2024-05-10 14:35 +08:00 . update
#include <stdio.h>
#include <string.h>
#include <sys/socket.h>
#include "simplehttpd.h"
void ProcessDoneCallback(PostProcessRetCode code, const char *filename, int datalen)
{
printf("code: %d, filename: %s, datalen: %d\n", code, filename, datalen);
}
int main()
{
struct PrintLogFuncSet set = {printf, printf};
int ret;
ret = RegisterPostProcessDoneCallback(ProcessDoneCallback);
printf("RegisterPostProcessDoneCallback ret=%d\n", ret);
ret = SetLogSavePath("/home/admin/");
printf("SetLogSavePath ret=%d\n", ret);
ret = RegisterLogFunc(set);
printf("RegisterLogFunc ret=%d\n", ret);
ret = StartHttpServerSync("127.0.0.1", 9999);
return 0;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mhbase/third_party_simplehttpd.git
git@gitee.com:mhbase/third_party_simplehttpd.git
mhbase
third_party_simplehttpd
third_party_simplehttpd
master

搜索帮助