Overview of TCP reliable communication

 

The data stream sent through the TCP connection is reliably and orderly delivered to the destination. Transmission reliability is achieved through the use of serial numbers and confirmations. Conceptually, each octet of data has a serial number. The sequence number of the first octet of the data in the segment is sent with the segment and is called the segment sequence number. The segment also carries an acknowledgment number, which is the sequence number of the next expected data octet transmitted in the reverse direction. When TCP transmits a segment containing data, it will simultaneously place a copy of the ship's speed data on the retransmission queue and start a timer. After receiving the confirmation of the data, the segment will be deleted from the queue. If no confirmation is received before the timer runs out, the data will be retransmitted.

The TCP confirmation cannot guarantee that the data has been delivered to the end user, but can only guarantee that the receiver's TCP has received the data.

In order to control the data flow between TCPs, a flow control mechanism is adopted. The TCP receiver reports a "window" to the sender. This window specifies how many octets of data the receiver is currently prepared to receive starting from the confirmation number.

 

 

 

https://tools.ietf.org/pdf/rfc793.pdf

Guess you like

Origin blog.csdn.net/maimang1001/article/details/112734338