Recently learned C++,linux and network programming, want to do a small (mini) project. Go to search engine, open source China, SourceForge to find the HTTP server project.
Well, you know. Knowledge of the programmer atmosphere is good, have a lot of experience to learn from.
Guide: Build A simple HTTP server in C (there will not be asked StackOverflow, so that if one day this site hangs, the webmaster will not be repaired, because no can ask AH)
Information:
1.rfc:rfc2616 Hypertext Transfer Protocol--http/1.1 (speaking HTTP protocol, 114 page size)
2.A Practical Guide to Writing clients and Servers (15 pages of printed content, slightly longer, slowly looking)
Preamble Knowledge Prerequisites:
0. Network knowledge (see TCP/IP illustrated)
1. Network programming (can see UNP, Unix network programming)
(or better getting started with the Beej ' s Guide to Network programming)
2. System API (see APUE, Advanced Programming in the UNIX Environment third Edition)
(The book thickness is not a problem, anyway to see later, see earlier)
Find a few lightweight small items: 1. nweb Tiny Webserver Example (Google search, 200 lines, C, security check)
2.Tiny HTTPd (recommended on StackOverflow, 500 rows, C, CGI supported)
(Csdn on the Source: "source anatomy" tinyhttpd--c language implementation of the simplest HTTP server )
3.mongoose (to the last question)
4.LIGHTHTTPD (lightweight, high-performance website, secure, fast, compatible and flexible Web server environment)
(Chinaunix's lighttpd-1.4.20 source analysis)
There is one more question, read someone else's code:
1. Book: Code Reading
2. Web page: Tips for Reading Code
A simple WEB server [not completed]