Networking - what is a socket

An Internet Socket Address is the name given to a combination of network parameters that are used to differentiate between multiple data streams. A socket is composed of the IPv4 or IPv6 address, the Transport Layer protocol, and the Transport Layer port number used for a communication. For example, if a host PC is communicating with a web server, the socket of the communication could be: TCP

The server's IP address is, the port being used is 80, and the Transport Layer protocol employed is TCP. These three parameters make a communication unique.

The term socket is not used as often as in the past. For example, when the Internet was beginning to grow back in the 1990s, and users would connect using a PSTN modem on a Windows 3.1 computer, a utility called Winsock was used to create a socket to the ISP's server to obtain access to network services and connectivity to the Internet.

Today, we use the term "session" more often, to refer to a unique communication stream that uses the TCP protocol. When using UDP, we more often talk about a socket because of the fact that UDP is connectionless, although it still maintains its uniqueness using the same elements.


Links to this page: