8000 GitHub - enable-shared-from-this/HttpServer: Http静态文件服务器
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Dismiss alert

enable-shared-from-this/HttpServer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HttpServer

Http静态文件服务器

安装和使用

头文件(http_header.h)cpp文件(http_header.cpp) 文件添加到工程

位于根目录的 main.cppCMakeLista.txt 为示范,

运行服务器

直接创建对象并设置参数

//创建对象
http_server m_http_server;

//设置参数
//第一,二个参数为要绑定的ip,端口
//第三个参数为web文件所在的文件夹(默认为"./")
//第四个参数为web文件夹中默认打开的文件(默认为"index.html")
m_http_server.set_config(std::string IP, int PORT, std::string web_file_path, std::string web_file_default);

//启动
m_http_server.start();

About

Http静态文件服务器

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0