Exploring TCP details: TCP Data Interaction

Source: Internet
Author: User

TCP details: TCP Data Interaction 2: TCP data interaction as mentioned earlier, TCP is a reliable protocol, because there is a data arrival confirmation mechanism between the sender and the receiver, if the sender does not receive a confirmation message within a certain period of time or the receiver receives a disordered message, re-sending ACK will trigger the sender to resend the message.
Www.2cto.com observe the packet capture above. The numbers 477651 to 477662 indicate the data interaction between the client and the server. During the interaction, the client sends 10 1024-length data packets to the server continuously, the C ++ code is as follows: for (I = 0; I <10; I ++) {send (m_clientSocket, buf, 1024, 0 );} note: 1: TCP will integrate the data packets submitted at the upper layer into a maximum packet for sending, such as 477652,477654. The packet segment length of these packets is exactly the length of MSS. Www.2cto.com 2: To prevent network congestion, the data packet sent from TCP at the beginning is not sent in the length of MSS, but is gradually increased according to the network situation, the transmission speed and length, as in the 477651, the length of the message sent is 1024, not MSS3: the receiving end does not confirm each data packet. Instead, it uniformly confirms all the data packets that arrive during the timer period, the server sends a package to the client, and the ACK package is sent to the client together with the package.

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.