Socket is a communication endpoint used to exchange data and messages. Sockets are managed by the respective operating system and can exchange data between programs both within a computer system and across networks.
In the area of client- server architectures, sockets are the standard means by which servers distribute any services to a large number of clients. The communication is always bidirectional, e.g. the client makes a request for a website and receives an HTTP response which contains the HTML document as well as status information.
Such a socket designates the logical endpoint of a connection and is defined by the data structure, the port, the IP address and the transport protocol - TCP protocol, UDP protocol, IPX protocol. This information is defined in the Protocol Control Block( PCB).
A socket is the address combination of IP address and port number with which a specific application on a specific computer can be addressed. The IP address is used to determine the network and the computer, and the port number is used to select the application.
Socket is a widely used LAN interface for applications on a network. Sockets are the basis for Berkeley's TCP/IP implementations. Even though the first implementation under Unix originated at Bekeley, sockets are not dependent on the operating system. Applications can be programmed distributed over the network using this programming interface.