Why is reliable TCP transport

TCP provides a connection-oriented, reliable byte stream service. 
     Connection-oriented: means that the two applications using TCP (usually a client and a server) must first establish a TCP connection before exchanging data with each other. In a TCP connection, only two parties communicate with each other. Not be used for broadcast and multicast TCP. 
 TCP provides reliability in the following ways: 
1, the application data is divided into data block deemed most appropriate TCP transmission. This is completely different UDP datagram length generated by the application will remain unchanged.                                                                  (Data will be truncated to a reasonable length) 
2, when a TCP segment sent, it starts a timer, waits for the destination to acknowledge receipt of the segment. If you can not receive a confirmation, it will retransmit this segment.                         
(Retransmission timeout) 
3, when the TCP connection is received from the bottom of the other end of the TCP data, it sends an acknowledgment. This acknowledgment is not sent immediately, usually postpone fraction of a second.                                                                 (For requests received, given acknowledgment) (the reason to postpone, may be to do a complete check on the package) 
4, TCP will keep testing it and the header and data. This test is an end and the aim of detecting any change in the data transmission process. If you receive a section of the test and an error, TCP discards this segment and do not acknowledge receipt of this segment. (Verifies that the packet is wrong, the packet discard section, no response is given, TCP data transmitting terminal, will timeout retransmission data) 
5, since TCP segment is transmitted as an IP datagram, the IP datagram arrives it may be out of order, so the arrival of TCP segments may also be out of order. If necessary, the data received by the TCP will reorder the data will be received in the correct order to the application layer. (Data for reordering out of sequence, and then will be delivered to the application layer) 
6, since the IP datagram occur repeatedly, the receiver must discard duplicate TCP data. (For duplicate data, it is possible to discard duplicate data) 
. 7, the TCP can provide flow control. Each TCP connection has a fixed side buffer space size. Receiving TCP only allows the other end of the transmitting and receiving end can receive the data buffer. This will prevent the buffer faster host resulting in slower host overflow. (TCP flow control may be performed, resulting in preventing the rapid host buffer overflow slower host) flow control protocol TCP is used in a variable size sliding window protocol. 
Byte-stream service ::
 Two applications exchanging connection via TCP byte stream 8bit byte configuration. TCP byte stream is not inserted record identifiers. We call this byte-stream service (bytestreamservice). 
TCP byte stream of content without any explanation of the content :: TCP byte stream without any explanation. TCP byte stream does not know the data transmission of binary data or ASCII character, EBCDIC character or other types of data. Interpretation of the byte stream from the TCP application layer both connected explained.

Guess you like

Origin blog.csdn.net/wujiafei_njgcxy/article/details/77986282