Get the App
SLTechnology News&Howtos  ›  Network Security  › 

TCP reliability

Shulou Source: shulou.com Published: 2022-06-01 04:27:22 10月05日 Update

TCP provides reliability in the following ways:

The application data is divided into blocks that TCP deems most appropriate to send.

When TCP sends out a segment, it starts a timer and waits for the destination to acknowledge receipt of the segment. If a confirmation is not received in time, the message segment will be resent.

When TCP receives data from the other end of the TCP connection, it sends an acknowledgement. This confirmation is not sent immediately and will usually be delayed by a fraction of a second.

TCP will maintain the checksum of its header and data. This is an end-to-end checksum designed to detect any changes in the data during transmission. If there is an error in the checksum received, TCP will discard the message segment and do not acknowledge receipt of the message segment (I hope the sender will time out and resend it)

Since TCP message segments are transmitted as IP datagrams, and the arrival of IP datagrams may be out of order, the arrival of TCP message segments may also be out of order. If necessary, TCP will reorder the received data and send the received data to the application layer in the correct order

Since the IP Datagram is duplicated, the receiver of the TCP must discard the duplicate data

TCP also provides flow control. Each side of the TCP connection has a fixed size of buffer space. The receiver of TCP only allows the other end to send data that can be accepted by the receiver buffer. This will prevent faster hosts from causing buffer overflows on slower hosts.

Tags: Data message buffer host destination end buffer transmission application reliability suitability necessity one side one end size timer will be right error application layer mode Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Xiaomi Linux Microsoft macOS