Is it reliable to use TCP? Why is it reliable?

      TCP: User data packet protocol. Provide connection orientation and ensure data reliability.

           • Connection-oriented: Before using the TCP protocol, a TCP connection must be established, and after the data is transmitted, the connection must be released.

           • A TCP connection can only have two endpoints: point-to-point or one-to-one.

           • TCP provides reliable delivery services: the data transmitted through the TCP connection has no errors, no loss, no duplication, and arrives in order.

           • TCP provides full-duplex communication: application processes on both sides of the communication can send data at any time.

           • TCP protocol: one to one.

           • TCP connection: Both ends have a sending buffer and a receiving buffer to store temporary communication data. When sending, the application transfers the data to the TCP buffer and can do other things. When receiving, TCP puts the received data into the buffer, and the upper-level application reads the buffer when appropriate.

           • Byte-oriented stream: The stream in TCP refers to the sequence of bytes flowing into or out of the process. "Byte stream-oriented meaning" The application and TCP are one data block at a time (with different sizes). The phenomenon of packet loss is not prone to occur, and the reliability is high (there is a packet loss retransmission mechanism).

Guess you like

Origin blog.csdn.net/feng8403000/article/details/114955746