data flow

This commit is contained in:
Quinten 2025-09-10 17:21:04 +02:00
parent b41bcfdf15
commit fa58455218

View File

@ -1 +1,49 @@
# webserv
# webserv
### Date Flow Overview
```
src/
├─ main.cpp # starts server
├─ Server.cpp/.hpp # listens & manages event loop
├─ Connection.cpp/.hpp # represents a single client
├─ RequestParser.cpp/.hpp
├─ Router.cpp/.hpp
├─ Response.cpp/.hpp
├─ CGIHandler.cpp/.hpp
├─ Config.cpp/.hpp # parses config file
└─ Utils.cpp/.hpp
```
```
[Client TCP packet]
┌───────────────┐
│ Event Loop │ (poll/select/epoll)
└──────┬────────┘
┌───────────────┐
│ RequestParser │ (builds Request struct)
└──────┬────────┘
┌───────────────┐
│ Router │ (selects location, checks methods)
└──────┬────────┘
┌───────────────┐
│ Handler │ (static file, CGI, error)
└──────┬────────┘
┌───────────────┐
│ ResponseBuilder│ (status line + headers + body)
└──────┬────────┘
[Send response back to client]
```