Introduction of Socket/UDP protocol based on UDP Protocol/UDP protocol lookup dns/process Introduction/operating system and process history

Source: Internet
Author: User
Tags ack

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.