Frequently Asked Questions: computer network / transport layer / UDP

IP does not increase almost anything else, no connection.

Advantage of
speed. For real-time.
No connection is established, there is no connection delay.
No connection state.
Packet header overhead small. TCP takes 20 bytes, UDP only 8 bytes.
Using the UDP protocol
the DNS
the SNMP
the RIP
the NFS
UDP checksum
sender: pair segment of all word and 16bits (overflow when summing the rewinding) inverse operation code, and is stored as a checksum.
The recipient: 16bits word sum all, 1 if it is full, no error.
Imagine the following scenario, you have to pass red sent a message to Bob, the content is three numbers, such as 1, 2, 3. You and Bob so often pass, then, while red is often spread wrong, so you both have such an agreement, you sent a message when all the numbers to pass the required look and and negated, and the number you want to pass along to tell small red, Xiao Ming after receipt of all the number adds up to 0, then that things pass no problem. So you pass 1, 2,3, - (3 + 1-2) = - 2, issued to red. Xiao Ming after receiving calculation 1-2 + 3-2 = 0, no problem, you have to say is to explain these numbers. This is the process of UDP transfer. However, no data UDP for error repair capacity, think about digital Xiaoming received 0, -2,3, -2, after he found that the addition result is -1, so he knows digital transmission wrong, but do not I know which numbers are wrong. You can discard this set of data.

Guess you like

Origin www.cnblogs.com/cielosun/p/11596407.html