

Sockets create an abstract model of the underlying network by mimicking a simple peripheral device.

In Unix, the commonly used API to the underlying communications system is via the socket routines. This means that applications that run within the operating system’s environment don’t need to implement their own network protocol engine, as they can make use of a shared common interface to the underlying network protocol engine via a simple standard interface. Among many other functions performed by a computer’s operating system, there is typically an interface to a shared local network protocol engine.
