The difference between the network transport layer protocol tcp and udp protocol

1. tcp: Transmission Control Protocol, Quanpin: Transmission Control Protocol It is a connection-oriented, reliable transmission protocol
2. udp: User Datagram Protocol, Quanpin: User Datagram Protocol It is not connection-oriented, not a reliable transmission protocol, UDP protocol transmission speed is fast
3. Both tcp and udp are two transmission protocols of the transport layer
4. Features of tcp: 4.1 Connection
-oriented, indirectly verify the validity of the other party's IP In the future, the other party will reply after receiving the data . 3 Error check: If the received data is inconsistent with the sequence number of the previously sent data packet, it will be automatically sorted as needed. If duplicate data packets are received, the duplicate data packets will be deleted. 4.2.4 Flow control: use tcp to Ensure that the computer will not be stuck when receiving data. 5. Comparison of the differences between tcp and udp 5.1 tcp is connection-oriented, udp is not connection-oriented . udp does not have 5.4 tcp with error checking, if the order of packets is inconsistent, it will be automatically sorted, and if it receives duplicate packets, it will automatically delete duplicate packets, udp does not have 5.5 tcp, there is flow control udp does not have 5.6 tcp, you need to establish a connection and then The resource overhead is required to be large, and udp does not need to establish a connection. The resource overhead is small












— The extension
5.7 tcp is suitable for sending a large amount of data. In theory, the data packets sent by tcp each time have no upper limit control, and the data packets sent by udp each time cannot exceed 64k
5.8 tcp Application scenarios: file upload and download, browser Internet access, most All applications use tcp protocol, udp application scenarios: send broadcast messages (Feiqiu online), audio and video transmission (qq and WeChat), including screen sharing software
5.9 tcp needs to establish a connection when sending data, udp does not need to establish a connection, udp sending speed is faster than tcp sending speed

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325660299&siteId=291194637