A communication connection between two programmes that are both operating on the network may be thought of as having one endpoint, which is referred to as a socket. The TCP layer must be able to identify the application that the data is supposed to be transferred to, and this is accomplished by binding a socket to a port number.