Building a Simple Web Server

This chapter builds on the previous one by looking at the HTTP protocol from the server's perspective. In it, we will build a simple web server. This web server will work using the HTTP protocol, and you will be able to connect to it with any standard web browser. Although it won't be full-featured, it will be suitable for serving a few static files locally. It will be able to handle a few simultaneous connections from multiple clients at once.

The following topics are covered in this chapter:

  • Accepting and buffering multiple connections
  • Parsing an HTTP request line
  • Formatting an HTTP response
  • Serving a file
  • Security considerations
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.9.22