159af6cLow-Level HTTP/1.1 Servermilestone
Low-Level HTTP/1.1 Server: Wire Protocol & Socket Buffer Framing
Bare-metal TCP socket HTTP server built on Node.js net module without web frameworks
Architecture Overview
Built an HTTP/1.1 server from scratch on raw TCP sockets:
- TCP Socket Binding: Binds directly via
net.createServerlistening on port 4221. - Buffer Unpacking: Manually unpacks incoming binary packet buffers, parsing HTTP verbs, target paths, and header tokens.
- Protocol Framing: Manually handles CRLF (
\r\n\r\n) protocol framing and returns compliant status lines (200 OK,404 Not Found). - Binary File Streaming: Reads and streams binary files (
application/octet-stream) directly across TCP sockets.