Unfortunately, C++ does not contain a native networking library (something that will hopefully be addressed with C++20). For this reason, POSIX sockets are needed to perform networking with C++. The POSIX sockets API defines an API for sending and receiving network packets using the standard, Unix file-descriptor paradigm. When programming with sockets, both a server and a client must be created. Servers are responsible for binding a specific port to the socket protocol that is being developed by the user of the sockets library. Clients are any other application that is connected to a previously-bound port. Both servers and clients have their own IP addresses.
When programming sockets, besides picking address types, such as IPv4 versus IPv6, typically the programmer must also choose between UDP versus TCP. UDP is a connectionless protocol that provides...