Definition: Sockets are the fundamental technology for programming software to communicate on TCP/IP networks. A socket provides a bidirectional communication endpoint for sending and receiving data with another socket. Socket connections normally run between two different computers on a LAN or across the Internet, but they can also be used for interprocess communication on a single computer.
Socket Libraries
Network programmers typically use socket libraries rather than coding directly to lower level socket APIs. The two most commonly use socket libraries are Berkeley Sockets (for Linux/Unix systems) and WinSock (for Windows systems).A socket library provides a set of API functions similar to those programmers use for working with files, such as open(), read(), write() and close().

