Summary: Based on the current UDP protocol: no connection and communication is unreliable; at the reference TCP protocol and the ISO 7 layer protocol, the X.25 protocol is designed to design a UDP-based communication protocol to implement UDP-based reliable communication and Weak connection characteristics. Key words: UDP, communication protocol, TCP, unreliable, weak connection.
1. Advantages with UDP communication: 1.1 System overhead Small, fast 1.2 For applications based on message packet delivery, frame-based communication (UDP) is more direct and effective than stream-based communication (TCP) 1.3 Realization of system redundancy in the application section, the task sharing provides a communication entity that greatly realizes and operability 1.4 peer-to-peer communication entities, and the application part is convenient to construct a client / server model and distribution processing model, which greatly enhances the application. The ability to operability and maintenance 1.5 can realize the mesh network topology of the fully graph model, which can greatly enhance the system's fault tolerance 2. The current UDP protocol is less than: 2.2 None connection 2.2 communication is unconnecting characteristics in certain The application may be an advantage, but most of the applications need to be connected. We have designed a UDP-based communication protocol to implement UDP-based communication protocols based on the TCP protocol and the ISO 7 layer protocol, the X.25 protocol. Reliable communication and weak connection characteristics 3, mainly by the following points: 3.1 Order 3.2 Reliability assurance 3.2.1 Synchronization 3.2.2 timeout redial 3.2.3 N-RAQ confirmation (including the belt mechanism) 3.2.4 Select Refuse 3.3 Quantity Control (Sliding Window Protocol) 4, the status driving diagram of the UDP protocol: Figure 1 Figure 1 The status of the UDP protocol driven Figure 5, the workflow of the UDP protocol: is a protocol based on UDP, which means the agreement To maintain a fact that the status and status information of each user data frame of the inflow, flowing out the communication module, but the establishment and release of the connection also does not have the strict requirements of protocols such as TCP. Communication modules are managed with a TCB (Transfer Control Block) to maintain a link of a link. Figure 2 is a normal communication process. Figure 2 A normal communication process Figure 3 Data frame PDU Lost Figure 4 confirms the frame loss Figure 6, below is a process for several network packets: 6.1 Data frame PDU (Protocol Data Unit) is lost. As shown in FIG. 3, the sender PDU (3) is lost in the transmission, and the receiver (P2) receives the PDU (1) and the PDU (2), because the number of the currently received is 3, so The receiver sends Rej (3), indicating that the PDU (3) is currently receiving, and also confirming 3 previous PDUs; after the sender receives REJ (3), directly resend the PDU (3), while The frame in the resend queue is less than 3 frames from the queue (confirmed). 6.2 Confirm the frame loss. As shown in FIG. 4, ACK (3) is lost, but the receiver will confirm the frame ACK (5), and the natural confirmation of 5 or less. If a confirmation frame of the sender is not received, the sender retransmits the PDU tail at the resended queue after retransmission of the timer to the recipient after receiving the serial number N small PDU, immediately Send ACK (N). In summary, whether it is a loss of data frame or a confirmation frame, the protocol can correct it to ensure reliable transmission of data. The transmission of the control frame and the waiting frame have multiple retry opportunities, and the loss of the network is not normal. As the SYN frame in the handshake phase, the handshake timer is continuously launched before the SYN-ACK is not received until the SYN-ACK is received.