TCP/ip detailed explanation-encapsulation

      When an application uses TCP to transmit data, the data is sent to the protocol stack, and then passes through each layer one by one until it is sent to the network as a stream of bits. Each layer must add some header information to the received data.

     The data unit that TCP transmits to IP is called TCP segment or TCP segment for short. The data unit that IP transmits to the network interface layer is called IP datagram. The bit stream transmitted via Ethernet is called a frame.

     UDP data is basically the same as TCP data. The only difference is that the information unit that UDP transmits to IP is called UDP datagram, and the first length of UDP is 8 bytes.

Guess you like

Origin blog.csdn.net/ma2595162349/article/details/108556734