C++ network programming using sockets
In this final section, we will build the last of our basic building blocks – a framework to handle network programming using Unix sockets. We will use this framework to build a server that listens for incoming TCP connections and a client that is capable of establishing a TCP connection to such a server. We will also use this framework to publish UDP traffic and consume from a stream of multicast traffic. Note that to limit the scope of this discussion, we will only discuss Unix sockets without any kernel bypass capabilities. Using kernel bypass and leveraging the kernel bypass API provided by the Network Interface Cards (NICs) that support it is outside the scope of this book. Note also that we expect you to have some basic knowledge or experience with network sockets and, ideally, programming network sockets in C++.
Building a basic socket API
Our goal here is to create a mechanism to create a network socket and initialize it with...