Both TCP and UDP are port-based protocols. TCP has links, and UDP has no links. The TCP protocol also drops packets (network problems, the data may be gone)
The application is sent to the operating system's cache, and the operating system is removed from the cache, and once the data is lost, it is completely gone. TCP is reliable because the data in its own cache is emptied after it receives a confirmation message.
How UDP works I took it out of my own cache, sent it out, emptied the cache, and the speed definitely closed TCP fast. UDP does not have links, more hair data do not consider the other side to give you the ACK message (the problem packet once lost)
Question 1:tcp Why is the protocol reliable?
Error answer: Because the TCP protocol has a link. (is not related to the nature of the link and how it works)
The correct answer: The TCP protocol is reliable because each data is sent until the response ACK, the data in its own cache will be clear. If you don't return the ACK again, it's reliable.
The UDP protocol is unreliable, not because there is no link, because the cache is emptied immediately after the data has been sent out.
Introduction of Socket/UDP protocol based on UDP Protocol/UDP protocol lookup dns/process Introduction/operating system and process history