News for hackers. Stuff that matters.
Re:Ask HN: Resources for Building a Webserver in C? by nam17887 on Sunday December 18, 2022 @05:57PM (#34045045)
I've written a fully functioning web server using a managed language, with SSL, multi-threading, Keep-Alive and chunked content encoding.

I suggest to start with understanding the HTTP protocol by reading the RFC. The most important part is how to start and end the HTTP message (by closing connection, by Content-Length, or by chunked encoding).

Then next important bit is how to receive the HTTP message. Network APIs will ask for number of bytes to receive, so you'll need to know exactly how the message ends.

Stick with the RFC, programming language doesn't matter because socket APIs are very much the same.

There are no comments on this comment yet.