ABSTRACT

This problem set marks the culmination of the course, integrating Socket Programming, String Parsing, and Systems Architecture. It focuses on building a functional HTTP server from scratch, handling network requests, and managing dynamic web content.


Problem Categories

Socket Programming & Server Basics

  • Hello World Server: The “minimum viable product” for networking—setting up a listener and sending a simple string to a client.
  • Echo Server: A server that reads data from a socket and writes it back, demonstrating basic two-way communication.
  • Status Code Server: Implementing the logic to return specific HTTP status codes (e.g., 200 OK, 404 Not Found) based on request validity.
  • Timestamp Functions: Generating correctly formatted date/time strings required for HTTP response headers.

HTTP Request Parsing

POST Requests & Data Extraction

Application Logic (The Chat System)

  • Format Single Chat Line: Transforming raw message data into a structured format for display.
  • Format Reaction Line: Handling social features like emoji reactions by generating specific HTML or JSON responses.
  • Calculator Server: A dynamic server that performs arithmetic based on parameters provided in the HTTP request.

Technical Summary

StepSystem FunctionPurpose
Setupsocket(), bind()Create a communication endpoint and assign it a port.
Listenlisten(), accept()Wait for an incoming connection and create a dedicated client socket.
Processread(), parse()Receive the raw HTTP request and extract the method/path.
Respondwrite(), close()Send the headers and body back to the client, then terminate the connection.

Folder Contents

16 items under this folder.