webserv/docs
2025-09-18 12:57:06 +02:00
..
ALLOWED_CLEAN.md Implement server initialization: add Server class with constructor to initialize host and port from ConfigManager 2025-09-16 15:05:35 +02:00
ALLOWED.md Implement server initialization: add Server class with constructor to initialize host and port from ConfigManager 2025-09-16 15:05:35 +02:00
ClassDiagram.mmd Add class diagram for Server, Socket, Client, HTTP_Request, and HTTP_Response 2025-09-18 12:57:06 +02:00
README.md data flow 2025-09-10 17:21:04 +02:00

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]