An HTTP server built from scratch in C++ using raw sockets, without any frameworks.
- C++17 compatible compiler (gcc, clang, or msvc)
- CMake 3.10 or higher
cmake -S . -B build
cmake --build build -j./build/http-serverThe server listens on 0.0.0.0:8080.
Once running, open a browser or use curl:
curl http://localhost:8080The server creates a TCP socket, binds it to an address and port, starts listening for connections, accepts clients, reads the incoming bytes, and sends back a manually constructed HTTP response.
.
├── CMakeLists.txt
├── server.cpp # Entry point
├── http_tcpServer.h # TcpServer class declaration
├── http_tcpServer.cpp # TcpServer implementation

