A socket is one endpoint of a communication link between systems. Your application sends and receives all of its network data through a socket.
There are a few different socket application programming interfaces (APIs). The first were Berkeley sockets, which were released in 1983 with 4.3BSD Unix. The Berkeley socket API was widely successful and quickly evolved into a de facto standard. From there, it was adopted as a POSIX standard with little modification. The terms Berkeley sockets, BSD sockets, Unix sockets, and Portable Operating System Interface (POSIX) sockets are often used interchangeably.
If you're using Linux or macOS, then your operating system provides a proper implementation of Berkeley sockets.
Windows' socket API is called Winsock. It was created to be largely compatible with Berkeley sockets. In this book, we strive to create...