A method of using ring cache and ring queue to realize efficient concurrency of udp
A circular queue and cache technology, applied in electrical components, transmission systems, etc., can solve problems such as client reception failures, reduce CPU idling time, improve CPU utilization, and avoid reception failures
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment Construction
[0027] The implementation process of the present invention is described in detail below in conjunction with accompanying drawing:
[0028] A method for realizing UDP efficient concurrency using a ring buffer and a ring queue, as shown in the figure, includes the following steps:
[0029] (1) Create a socket for the data receiving thread and bind a port, initiate the data receiving thread of the server, and create a ring queue.
[0030] (2) The data receiving thread receives data at the binding port. If legal data is received, the communication address in the data (referring to the IP address of the source client or the communication address of the device contained in the data) is used to determine whether the corresponding client already exists. If there is a data processing sub-thread at the end, directly perform step (4); if not, perform step (3) first to create a new data processing sub-thread, and then perform step (4). Data legitimacy is judged based on the comprehensive...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 

