Simple demo utilising socket.
- Listens TCP port 80
- Responds everything with HTTP response
{"status":"ok"}
- Lightweight, multithreading, and (nearly) cross-platform
To run (take Linux as example):
mkdir build
cd build
cmake ../src
./HttpEater
- Define
NO_PRINT
to inhibit printing detailed request. - Define
DISABLE_MULTI_THREADING
to use single thread.
You may need a compiler supporting C++20 to compile.