A UNIX socket is an inter-process communication mechanism that allows bidirectional data exchange between processes running on the same machine. ... In some cases, you can use TCP/IP sockets to talk with processes running on the same computer (by using the loopback interface).
Sockets are communication points on the same or different computers to exchange data. Sockets are supported by Unix, Windows, Mac, and many other operating systems. The tutorial provides a strong foundation by covering basic topics such as network addresses, host names, architecture, ports and services before moving into network address functions and explaining how to write client/server codes using sockets.