A socket is one endpoint of a two-way communication link between two programs running on the network.
A socket is a combination of the port number and the IP address, so that the TCP/UDP layer can identify the application that data is destined to be sent to.
Take an example of an apartment building ( World Famous Analogy)
- The street address of the building is the IP Address
- The specific apartment number in that building is the port number (port number tells the type of data transmission - TCP or UDP)
- The door of the apartment is the Socket (TCP + Socket)
So, the postman (TCP Layer) needs all the values
- Building Address (IP Address)
- Apartment Number (Port Number)
- Door (Socket)
so that the letter in postman's hand (data) can arrive at the correct destination (application).
0 comments:
Post a Comment