摘要: One basic function of the transport layer is multiplexing and demultiplexing. Usually there are multiple application processes running on one host. For example, a computer may be sending several files generated by filling in web forms, while at the same time sending emails. The network layer only cares about sending a stream of data out of the computer. Therefore, the transport layer needs to aggregate data from different applications into a single stream before passing it to the network layer. This is called multiplexing. Similarly, when the computer receives data from the outside, the transport layer is again responsible of distributing that data to different applications—such as a web browser or email client—in a process called demultiplexing. Figure 1 also shows the data directions for multiplexing (sending) and demultiplexing (receiving).