In this chapter, we learned how to program POSIX sockets using C++17. Specifically, we learned the common APIs associated with POSIX sockets, and how to use them. We concluded this chapter with five different examples. The first example created a UDP echo server, while the second example created a similar echo server using TCP instead of UDP, outlining the differences between the different approaches. The third example expanded upon our debug example by adding a server component to our debugger. The fourth and fifth examples demonstrated how to process a simple network packet, and the benefits of using marshaling to simplify the process.
In the next chapter, we will discuss the C and C++ time interfaces that can be used to get the wall clock, measure elapsed time and perform benchmarking.