0de6dfda58e72085c576d15d1f17627b5a7970b3
cws
A minimal HTTP web server written in C.
Note
: This is a personal project; it is not intended to be a production-ready tool, nor will it ever be. Use it at your own risk.
Requirements
- myclib (on my profile)
- tomlc17
Build
meson setup build
meson compile -C build
Usage
- Copy
config.tomlandwww/directory to your working directory - Run
./build/cws - Open
http://localhost:3030in your browser
Roadmap
- Virtual hosts support
- Minimal templating engine
- IPv6 compatibility
Performance
Tested with goku (-c 400 -d 30):
Concurrency level 400
Time taken 31 seconds
Total requests 365363
Mean request time 22.665250723253322 ms
Max request time 2067 ms
Min request time 0 ms
95'th percentile: 20 ms
99.9'th percentile: 1078 ms
200 OK 365363
Languages
C
82.6%
HTML
13.4%
Meson
4%