A high-performance, multi-threaded HTTP server implemented in C++ using Boost.Asio.
- Asynchronous I/O: Uses
boost::asiofor non-blocking network operations. - Multithreading: Runs the
io_contexton a thread pool to handle multiple requests concurrently. - Clean Architecture: Separates
Server(acceptor) andSession(connection handling) logic. - Memory Management: Uses
std::shared_ptrandstd::enable_shared_from_thisfor safe object lifetime management.
- C++17 compliant compiler (GCC, Clang, MSVC)
- CMake 3.14+
- Boost Libraries (specifically
boost::systemandboost::asio)
brew install cmake boostmkdir build
cd build
cmake ..
make./web_server 8080Open a browser and visit http://localhost:8080 or use curl:
curl -v http://localhost:8080