Multiplexing and Demultiplexing in Transport Layer

Multiplexing is the process of collecting the data from multiple application processes of the sender, enveloping that data with headers and sending them as a whole to the intended receiver.

Demultiplexing

Delivering the received segments at the receiver side to the correct app layer processes is called demultiplexing.

Multiplexing and demultiplexing are just concepts that describe the process of the transmission of data generated by different applications simultaneously. When the data arrives at the Transport layer, each data segment is independently processed and sent to its appropriate application in the destination machine.

The main objective of multiplexing and demultiplexing is to allow us to use a multitude of applications simultaneously.

In the above figure, the Application layer has generated data, and then passed it down to the Transport layer to be segmented.