Joke Collection Website - Cold jokes - Concepts and differences between tcp and udp

Concepts and differences between tcp and udp

The conceptual differences between tcp and udp are as follows:

1, TCP is connection-oriented (for example, dial to establish a connection before making a phone call); UDP is connectionless, that is, there is no need to establish a connection before sending data.

2.TCP provides reliable services. In other words, the data transmitted through TCP connection has no errors, no loss, no duplication, and arrives in order; UDP tries its best to deliver, but there is no guarantee? Reliable delivery of certificates.

3.TCP is oriented to byte streams. In fact, TCP treats data as a series of unstructured byte streams. UDP is message oriented.

UDP has no congestion control, so network congestion will not reduce the sending rate of the source host (very useful for real-time applications, such as IP telephony, real-time video conferencing, etc. ).

4. Each TCP connection can only be point-to-point; UDP supports one-to-one, one-to-many, many-to-one and many-to-many interactive communication.

TCP header overhead is 20 bytes; The header overhead of UDP is very small, only 8 bytes. The logical communication channel of TCP is a full-duplex reliable channel, while UDP is an unreliable channel. ?

Related information:

1 and UDP do not provide complicated control mechanisms, but use IP to provide connectionless communication services. It is a mechanism to send the data sent by the application to the network as it is received. In the case of network congestion, UDP can't do traffic control to avoid network congestion.

2.TCP completely realizes all kinds of control functions during data transmission, and can control packet loss retransmission and out-of-order subcontracting. None of this is available in UDP. In addition, as a connection-oriented protocol, TCP only sends data when communication peers exist, thus controlling the waste of communication traffic.

3.TCP realizes reliable transmission through mechanisms such as checksum, sequence number, acknowledgement, retransmission control, connection management and window control.