Writing a web server in C

Introduction A while ago I started work on a web server written in C. The project is available here. Before I had written a web server in rust (found here) so I was a bit familiar with HTTP and since this wasn’t my first ever C project I of course knew a bit about basic file handling and error handling. The main new things to learn where the following: Working with sockets Using a thread pool with: Worker threads An event queue for incoming requests Parsing a configuration file Technical details Sockets While I was somewhat familiar with sockets I hadn’t used them in C (I used them in a small python web server)....

April 17, 2024 · Moritz Sokoll