How hyeonju-u/temp works
This is a single-threaded C HTTP/1.1 server that serves static files and optionally reverse-proxies requests by path to round-robin backends. The principal workflow is accepting a client connection, parsing its request, routing it to a proxy route or static-file handler, then sending the resulting response; the event loop and timer heap support nonblocking I/O and connection deadlines. The graph preserves the documented proxy, configuration, and graceful-shutdown branches. Some subsystem links rely on README descriptions because their implementation excerpts were not supplied.
Main entry points: server.c Server Orchestrator · main.c Process Entry · proxy.c Proxy Relay · static_file.c Static File Handler
Components 17
Server Runtime
- Server Orchestrator
src/server.c - Event Loop
src/event.c - Connection State
src/connection.c - Process Entry
src/main.c
HTTP Handling
- Request Parser
src/http_parser.c - Response Builder
src/http_response.c
Static Content
- Static File Handler
src/static_file.c - MIME Lookup
src/mime.c
Reverse Proxy
- Proxy Configuration
src/proxy_config.c - Proxy Relay
src/proxy.c - Proxy Message Handling
src/proxy_message.c
Runtime Support
- Deadline Heap
src/timer_heap.c - Byte Buffers
src/buffer.c - Signal Handling
src/signals.c - Logging
src/log.c
Other components
- HTTP Client
- Backend Servers
Connections 19
- HTTP Client → Server Orchestrator: sends requests
README.md - Server Orchestrator → Event Loop: dispatches events
README.md - Server Orchestrator → Connection State: manages connections
README.md - Server Orchestrator → Request Parser: parses requests
src/server.c - Server Orchestrator → Proxy Configuration: matches routes
src/server.c - Server Orchestrator → Proxy Relay: starts proxying
src/server.c - Server Orchestrator → Static File Handler: opens static files
src/server.c - Server Orchestrator → Response Builder: builds responses
src/server.c - Static File Handler → MIME Lookup: looks up types
src/static_file.c - Proxy Relay → Proxy Message Handling: parses and builds messages
src/proxy.c - Proxy Relay → Backend Servers: forwards requests
README.md - Backend Servers → Proxy Relay: returns responses
README.md - Server Orchestrator → Deadline Heap: manages deadlines
README.md - Server Orchestrator → Byte Buffers: buffers I/O
README.md - Process Entry → Proxy Configuration: loads configuration
src/main.c - Process Entry → Server Orchestrator: creates and runs
src/main.c - Process Entry → Signal Handling: installs handlers
src/main.c - Process Entry → Logging: sets log level
src/main.c - Server Orchestrator → Logging: records runtime events
src/server.c