Lesson 1: Sockets

  • Input and output
  • System calls and your OS
  • File descriptors
  • But what about the sockets?
  • And web servers?
  • And now Haskell
  • 9 minutes
sockets network network-simple

The goal of this course is for you to understand web servers thoroughly. Of course, we have to scope that, because I’m not going to explain everything from physics and transistors up through the internet. So we have to start with some baseline concept, some abstraction that we’re not going to look under, but simply learn how to use. That concept for us right now is: Sockets.

The concept of a socket forms the core of the Unix networking library. I will be talking about Unix-like systems (including Linux and macOS) because that’s what I know; Windows also has a concept of sockets, and the Haskell libraries that we will use support all the major platforms. The details may change between platforms, but it should be close enough.

If you feel like you already have a solid understanding of what sockets are, you can go ahead and skip to lesson 2.