Hacker News new | ask | show | jobs
by nam17887 1277 days ago
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.