UDP and TCP transport mode data What is the difference between the two?

--- the TCP Transmission Control Protocol, provides a connection-oriented , reliable byte stream service.

When former client and server to exchange data with each other, it must first establish a TCP connection between the two sides, in order to transmit data after.

TCP provides a retransmission timeout, discards the duplicate data, test data, flow control and other functions, to ensure that data transmitted from one end to another end.

--- the UDP User Datagram Protocol is a simple datagram-oriented transport layer protocol .

UDP does not provide reliability, it just passed to the application layer IP datagram sent, but does not guarantee that they can reach their destination.

Because UDP without establishing a connection between the client and the server before transmitting the data reported, and no timeout retransmission mechanisms, and therefore the transmission speed quickly.

Guess you like

Origin blog.csdn.net/qq_41479464/article/details/94481476