Introduction to socket programming
As part of this chapter, we decided to discuss socket programming before going through the real C code examples as part of the next chapter. That's because there are some fundamental concepts that you need to know before jumping to the code.
Socket programming can be done both on single-host and multi-host deployments. As you might have guessed, the socket programming in a single-host system is done through Unix domain sockets. In a multi-host setup, socket programming is about creating and using network sockets. Both Unix sockets and network sockets more or less use the same API and share the same concepts, so it would make sense to cover them together in the next chapter.
One of the key concepts before using network sockets is how computer networks work. In the following section, we are going to talk about this and introduce you to computer networks. There are many terms and concepts that you should know before being able to...