r/C_Programming • u/Realistic_Debate1704 • 28d ago
Suggest me sources for http server
I want to make http server in C/C++ but I can't find the exact source that will teach me the basics of networking and give code snippets I've checked beejs guide but one is totally theory a new other is totally programming
So anyone please suggest me a source to learn about networking (to the point ) Docs or video anything can be accepted Thanks for you time!
18
Upvotes
14
u/vectorj 28d ago
https://beej.us/guide/bgnet/
8
u/SeriousPlankton2000 28d ago
The most simple server is listening on port 80, reading till there are two "\n" and then writing the headers, an extra "\n" and the content of the page.
Here is the documentation on what to do on the protocol layer:
https://www.rfc-editor.org/rfc/rfc9110.html
6
u/kabekew 28d ago
https://beej.us/guide/bgnet/
3
u/Evil-Twin-Skippy 28d ago
https://fossil.etoyoc.com/fossil/clay/index
I'm the developer for the httpd module in Tcllib. If you think of Tcl as "The C Library", having the stack in script solves a whole bunch of problems.
1
u/Competitive_Travel16 28d ago
https://github.com/civetweb/civetweb
5
u/[deleted] 28d ago
[removed] — view removed comment