How forthespada/mypoorwebserver works
Main Components
• Client (Web Browser): Represents the browser making HTTP requests.
• HTTP Server Process: The core executable (compiled from httpd.c via Makefile) that listens to incoming connections on port 6379.
• Static & CGI Content Directory (“httpdocs”): This folder holds your HTML pages and CGI script files, which the server will access to serve content.
• Build System: The Makefile used for compiling the server, which, although not part of the runtime, reflects the build process.
Architectural Patterns and Design Principles
• If any multi-threading or non-blocking I/O is hinted at within the code (though details aren’t provided, keep the design extensible), consider a note that the server could handle concurrent connections.
• Separation between the network handling (listening on the specified port) versus the file access layer (static file/CGI retrieval).