How harisahmed05/http-server works
This is a minimal C++ HTTP server built on raw TCP sockets. Its workflow starts in server.cpp, which constructs the server for 0.0.0.0:8080 and starts listening. The server accepts a client, reads incoming bytes, and sends a prebuilt HTTP 200 HTML response; it does not parse the request. The graph separates startup, connection handling, and response generation. Relationships are supported by the shown source or README; the client connection is documented rather than directly implemented as an in-process call.
Main entry points: http_tcpServer.cpp Listen loop · http_tcpServer.h TcpServer · server.cpp Server entry point
Components 9
Server startup
- Server entry point
server.cpp - TcpServer
http_tcpServer.h
TCP connections
- Socket setup
http_tcpServer.cpp - Listen loop
http_tcpServer.cpp - Accept connection
http_tcpServer.cpp - Read request bytes
http_tcpServer.cpp
HTTP response
- Build HTTP response
http_tcpServer.cpp - Write response
http_tcpServer.cpp
Other components
- HTTP client
Connections 9
- Server entry point → TcpServer: constructs
server.cpp - Server entry point → Listen loop: starts listening
server.cpp - TcpServer → Socket setup: initializes socket
http_tcpServer.cpp - TcpServer → Build HTTP response: builds response
http_tcpServer.cpp - Listen loop → Accept connection: accepts clients
http_tcpServer.cpp - Listen loop → Read request bytes: reads bytes
http_tcpServer.cpp - Listen loop → Write response: sends response
http_tcpServer.cpp - HTTP client → Listen loop: connects to
README.md - Write response → HTTP client: writes response
http_tcpServer.cpp