【文件属性】:
文件名称:WebServer:C ++高性能HTTP Web服务器
文件大小:58KB
文件格式:ZIP
更新时间:2021-05-17 16:23:06
C++
A C++ Lightweight Web Server
简介
这是一个轻量级的 Web 服务器,目前支持 GET、HEAD 方法处理静态资源。并发模型选择: 线程池+Reactor+非阻塞方式运行。
测试页面:
Part Ⅰ
Part Ⅱ
开发部署环境
操作系统: Ubuntu 5.4.0-6 Ubuntu16.04.9
编译器: g++ version 5.4.0 20160609
版本控制: git
编辑器: Vim
压测工具:
Usage
cmake . && make
./webserver [-p port] [-t thread_numbers] [-r website_root_path] [-d daemon_run]
核心功能及技术
状态机解析 HTTP 请求,目前支持 HTTP GET、HEAD 方法
使用 priority 队列实现的最小堆结构管理定时器,使用标记
【文件预览】:
WebServer-master
----整体设计.md(3KB)
----测试.md(7KB)
----.github()
--------workflows()
----test()
--------processpool.c(16KB)
--------threadpool.cpp(14KB)
----include()
--------noncopyable.h(297B)
--------Server.h(1KB)
--------Util.h(469B)
--------Timer.h(2KB)
--------MutexLock.h(944B)
--------HttpData.h(1KB)
--------ThreadPool.h(1KB)
--------HttpResponse.h(2KB)
--------Socket.h(912B)
--------main.h(1KB)
--------HttpParse.h(2KB)
--------HttpRequest.h(2KB)
--------Epoll.h(1KB)
----更新说明.md(4KB)
----src()
--------Server.cpp(11KB)
--------HttpResponse.cpp(2KB)
--------Util.cpp(2KB)
--------HttpRequest.cpp(499B)
--------ThreadPool.cpp(4KB)
--------Socket.cpp(6KB)
--------Epoll.cpp(6KB)
--------threadpool3.cpp(10KB)
--------main.cpp(4KB)
--------Timer.cpp(2KB)
--------HttpData.cpp(562B)
--------HttpParse.cpp(5KB)
--------threadpool2.cpp(15KB)
--------线程模型.md(7KB)
----pages()
--------404.html(175B)
--------index.html(568B)
--------403.html(175B)
----README.md(2KB)