Back to Projects

HTTP-Server-In-C

C

Project Overview

HTTP server in C

A lightweight cross-platform HTTP server written in C from scratch. Learning project to understand how web servers work at a low level, from accepting TCP connections to parsing requests and sending responses.

Features

  • Establishing an HTTP server on top of TCP sockets
  • Receiving and parsing HTTP requests
  • Sending HTTP responses

What I Learned

Creating this project taught me the fundamentals of how HTTP servers function and how they are built on top of TCP sockets, I learned:

  • TCP socket creation
  • Binding to a port
  • Listening for incoming connections
  • Accepting client connections
  • Receiving HTTP requests
  • Parsing HTTP request lines
  • Parsing HTTP header lines
  • Sending HTTP responses