9.3.2.1 Network principle (transport layer UDP)

1. The basic characteristics of UDP: connectionless, unreliable transmission, datagram-oriented, full-duplex.

2. The port numbers from 1 to 1024 have specific meanings and are not recommended. For example, 21: ftp, 22: ssh, 80: http, 443: https.

3. CRC check algorithm: Cyclic Redundancy Checksum, accumulates each byte in the UDP report in turn, puts the accumulated result in a two-byte variable, overflow does not matter, because it is added over again.

When transmitting data, send both the original data and the checksum, and after receiving it, calculate it again in the same way. If it is the same, it can be considered correct (regardless of special circumstances), and if it is different, it can be considered wrong. , the data will be discarded and will not be resent.

Guess you like

Origin blog.csdn.net/m0_73345579/article/details/132246179