The transfer of data amongst
Let's suppose it's our friend's birthday, and we want to send them a gift. For this, we need to know the following about their home address:
Now, the house number and street number together must be unique for every single house to ensure that the gift does indeed reach our friend's house.
This is how port addressing works.
Port addressing refers to using the port numbers assigned to every process to exchange data between them. Now, for processes that send and receive data over the internet, the following information must be assigned to every process:
Collectively, the IP address and port number form a socket address (socket number). This enables every single process to be uniquely identified over the internet.
The sender must provide the receiver's socket address for a packet to reach its intended destination. The first part of the socket address (the IP address) enables the packet to reach the receiver's machine. It will then route the packet to the designated process through the second part of the socket address (the port number).
The animation below illustrates how two processes on different machines can communicate using port addressing.
Free Resources